XML empty slots in array returned by getChildren(). What am I missing?
in
Programming Questions
•
3 months ago
Hi first time dealing with XML, already in doubt...
<?xml version='1.0' encoding='UTF-8'?>
<proposicoes>
<proposicao>
<id>584676</id>
<nome>PL 5931/2013</nome>
</proposicao>
</proposicoes>
(I edited that from a large XML for testing)
Using this code (basically one of the XML examples):
- XML xml;
- XML[] props;
- void setup() {
- xml = loadXML("proj2013solo.xml");
- props = xml.getChildren();
- println (props);
- }
I got his output:
[0]
[1] <proposicao><id>584676</id><nome>PL 5931/2013</nome></proposicao>
[2]
Why those empty entries in the array? Is this normal? How should I deal with them? Just ignore? It's supposed to a be a HUGE xml file, thousands of empty lines... Thoughts?
Processing 2.0.1
2