You can modify the returned DomDocument, and dump it as an XML file
by using DomDocument->dump_mem() or DomDocument->dump_file().
![]() | domxml_xmltree说明DomDocument domxml_xmltree ( string str )The function parses the XML document in str and returns a tree PHP objects as the parsed document. This function is isolated from the other functions, which means you cannot access the tree with any of the other functions. Modifying it, for example by adding nodes, makes no sense since there is currently no way to dump it as an XML file. However this function may be valuable if you want to read a file and investigate the content. ![]()
jeroen dot s at zonnet dot nl
16-May-2006 04:36
You can modify the returned DomDocument, and dump it as an XML file
23-Feb-2005 10:38
Replacing line 10 works well, but replacing line 15 causes some errors. I have a tree like:
Alan71
08-Feb-2004 02:05
In the function of nutbar, try to replace line 10 by
samc a t rampantlabs dot net
27-Dec-2002 04:36
Forgive me if I am mistaken, but the whole point of including the "useless white space" is because of the existence of mixed types, for example:
colin at omenmedia dot com
13-Dec-2002 11:03
This is a genuinely useful function, however, as with any DOM-based markup parser, be mindful of the size of the XML document you are parsing. Representing very large XML files as object structures requires *a lot* of memory and processing, and may even crash your server (which is what happened to my Apache when I tried parsing a 2MB XML file using this function, just for fun... ;).
nospam at candlefire dot org
15-Oct-2002 11:03
Consider the following revisions for including attributes into the array.
nutbar at innocent dot com
13-Oct-2002 03:18
Same concept as previous function, except uses node names as key items in the arrays. This function may prove a bit more useful than the previous one: | ![]() |