Thunderstone Software Document Search, Retrieval, and Management
Search:
Vortex Manual
 

Opening / Creating a Document

All work with the xmlTree API starts with the document, whether you're using existing data or starting from scratch. There are three ways to obtain an xmlDoc object:

  • Reading an XML document from a file (xmlTreeNewDocFromFile(), here)

  • Reading an XML document from a string (xmlTreeNewDocFromString(), here)

  • Starting a new document (xmlTreeNewDoc(), here)


EXAMPLE

<$rawXml = "<simpleExample>read me</simpleExample>">
<$doc = (xmlTreeNewDocFromString($xmlRaw))>
<$root = (xmlTreeGetRootElement($doc))>
...
<$doc = (xmlTreeNewDocFromFile( 'sample.xml'))>
<$xpath= (xmlTreeNewXPath($doc))>
...
<$doc = (xmlTreeNewDoc( '1.0'))>
<$root = (xmlTreeNewElement($doc, 'rootNode'))>


SEE ALSO
xmlTreeNewDoc, xmlTreeNewDocFromFile, xmlTreeNewDocFromString


Copyright © Thunderstone Software     Last updated: Mon Feb 18 10:28:15 EST 2013
 
Home   ::   Products   ::   Solutions   ::   How to Buy   ::   Support   ::   Contact Us   ::   News   ::   About
Copyright © 2013 Thunderstone Software LLC. All rights reserved.