PageRenderTime 9ms CodeModel.GetById 4ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/core/xml/XmlDom.php

http://zoop.googlecode.com/
PHP | 24 lines | 18 code | 2 blank | 4 comment | 0 complexity | 71ab6fd11519750d0181e222fcd78d49 MD5 | raw file
 1<?
 2class XmlDom
 3{
 4	var $xmlTree;
 5	
 6	//	returns the root node
 7	function parseText($xml)
 8	{
 9		$this->xmlTree = new DOMDocument();
10		$this->xmlTree->loadXML($xml);
11		return new XmlNode($this->xmlTree->firstChild);
12	}
13	
14	function parseFile($fileName)
15	{
16		$this->xmlTree = new DOMDocument();
17//		print_r($this->xmlTree);
18		$this->xmlTree->load($fileName);
19//		print_r($this->xmlTree->documentElement->firstChild->nextSibling->nodeName);
20//		die('here');
21		return new XmlNode($this->xmlTree->documentElement);	
22	}
23}
24?>