We cannot easily find out how many URLs there will be when we start parsing, even though they're all in memory.
Single threaded by nature; no benefit to mutiple threads since no data will be available until the entire document has been read and parsed.
The character data of each url
element needs to be read.
Everything else can be ignored.
We can use NodeIterator
to walk the tree.
We can use NodeIterator
to select only the
url
elements.
The XML parsing is so straight-forward it can be done inside one method. No extra class is required.