Arguments

Description

Read and parse a XML file. The returned document allows to access to the DOM tree which is kept in memory.

If validateDTD is set to true, the document will be validated or not during the parsing operation.

The encoding argument is used to precise the file encoding.

It is important to notice that the tree must be freed (to avoid memory leaks) with the function xmlDelete.

Examples

doc=xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml");e=doc.root.children(1).children(1)e.namee.contentxmlDump(e)// Now we can retrieve all the nodes with an 'href' attributeq=xmlXPath(doc,"//*[@href]");q(1).attributes.href// We delete the docxmlDelete(doc);