This is the xml:
<xml xmlns:log="http://sample.com">
<test log:writer="someWriter" />
</xml>
I am trying to get the attribute value of "log:writer" using the following line of code:
currentNode.getAttributes().getNamedItemNS("log", "writer")
I tried also to place the xmlns:log="http://sample.com" declaration on the "test" node, but I receive always a NullPointerException
. The DocumentBuilderFactory
used for the Document
has also the setNamespaceAware
enabled. Any hint?