I want to use getChildText() to get text from a node that is a few levels deep. There are two namespaces in the file. The syntax below does not work and sets textToGet to null.
String textToGet = root.getChildText("ns1:Customer/ns1:Address/ns1:Street/ns2:Streetname");
I know there is an alternative of first getting the Child Element, and then its Text, but I want to use a one-liner.
Also, would rather not chain getChild(), because some of the elements are not guaranteed to be in the file.