XMLReader does include support for namespaces. Similar to DOM, XMLReader provides separate methods to handle namespaces, which are named after the simpler, non-namespace accepting methods with “Ns” tacked on the end. Perhaps surprisingly, there aren’t many of them. Many methods, like
readOuterXML(), don’t care whether you’re working with namespaces or not. They operate on whichever node the cursor is pointing to, regardless of the presence or absence of a namespace identifier.
Because XMLReader’s cursor doesn’t care whether the node it’s pointing to has a namespace or not, almost all the methods that operate on namespaces are related to attributes. The one exception, and probably ...