Looks like you haven't understood the comments of the issue.
loadXML() is fine, and parseXML() won't change the behavior with regard to whitespace.
The idea is not to try and process each and every node of the XML file, but to search and get only those you are interested in.
Use getChildren() with a name as parameter to get the tags with this name.
loadXML() is fine, and parseXML() won't change the behavior with regard to whitespace.
The idea is not to try and process each and every node of the XML file, but to search and get only those you are interested in.
Use getChildren() with a name as parameter to get the tags with this name.