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

Creating Nodes

New nodes are added to an xmlTree by various new functions. They all take a parent, which specifies where the new node should be created, and either a name and optional content (in the case of elements and attributes), or just content (comments, CDATA, etc).


EXAMPLE

<$doc = (xmlTreeNewDoc( '1.0'))>
<$root = (xmlTreeNewElement($doc, 'rootNode'))>
<$name = (xmlTreeNewElement($root, 'name', 'John Doe'))>
<$age = (xmlTreeNewElement($root, 'age', '23'))>
<$ret = (xmlTreeNewAttribute($age, 'type', 'years'))>
<$output = (xmlTreePrintDoc($doc, 'INDENT'))>
output is $output


SEE ALSO
xmlTreeNewElement, xmlTreeNewPI, xmlTreeNewText, xmlTreeNewCDATA, xmlTreeNewComment, xmlTreeNewAttribute, xmlTreeNewNs


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.