Namespace prefixes in xml are essentially an alias for the namespace uri. In other words, the namespace prefix doesn't matter -- just the namespace URI. You can declare the namespace prefix in your xpath even though it doesn't appear in the xml document. For example, you can refer to the default namespace using the 'B' prefix in the xpath:
// document using default namespace
XmlObject xobj = XmlObject.Factory.parse(
"<a xmlns='testA'>\n" +
" <b xmlns=''>\n" +
" <x>12345</x>\n" +
" </b>\n" +
"</a>");
// Use xpath with default namespace declaration to find <b> element.
XmlObject bobj = xobj.selectPath(
"declare namespace B=''; " +
".//B:b")[0];