We want to initialize the XML parser, load the XML, and loop through all elements of the
Example
< ?php |
The output of the code above will be:
#text = |
In the example above you see that there are empty text nodes between each element.
When XML generates, it often contains white-spaces between the nodes. The XML DOM parser treats these as ordinary elements, and if you are not aware of them, they sometimes cause problems.