Setting Information

There are relatively fewer functions fore setting data, reflecting the fact that the only real data stored in the nodes are name and content.

Once again xmlNs get their own versions for the prefix and URI.


EXAMPLE

<capture>
<rootNode><name>John Doe</name><age>34</age></rootNode>
</capture><$xmlRaw = $ret>
<$doc = (xmlTreeNewDocFromString( $xmlRaw, 'XML_PARSE_NOBLANKS'))>
<$root = (xmlTreeGetRootElement($doc))>
<$name = (xmlTreeGetChildren($root, 'name'))>
<$ret = (xmlTreeSetName($name, 'target'))>
<$ret = (xmlTreeSetContent($name, 'Jane Doe'))>
<$output = (xmlTreePrintDoc($doc, 'INDENT'))>
output is $output


SEE ALSO
xmlTreeSetName, xmlTreeSetContent, xmlTreeAddContent, xmlTreeSetNsPrefix, xmlTreeSetNsURI


Copyright © Thunderstone Software     Last updated: Mar 25 2020
Copyright © 2020 Thunderstone Software LLC. All rights reserved.