$xml = new XmlTypeCheck( $file );
if( $xml->wellFormed ) {
global $wgXMLMimeTypes;
- if( isset( $wgXMLMimeTypes[$xml->rootElement] ) ) {
- return $wgXMLMimeTypes[$xml->rootElement];
+ if( isset( $wgXMLMimeTypes[$xml->getRootElement()] ) ) {
+ return $wgXMLMimeTypes[$xml->getRootElement()];
} else {
return 'application/xml';
}
$this->softNamespaces = $softNamespaces;
$this->run( $file );
}
+
+ /**
+ * Get the root element. Simple accessor to $rootElement
+ */
+ public function getRootElement() {
+ return $this->rootElement;
+ }
private function run( $fname ) {
if( $this->softNamespaces ) {