Why does this xpath not work

Mikael Petterson <[email protected]> Wed, 21 Dec 2022 14:46:38 +0000
Newsgroups gmane.comp.jakarta.poi.user
Message-ID <AS8PR07MB82493257CAE85C5173A9E593F0EB9@AS8PR07MB8249.eurprd07.prod.outlook.com>
Hi,

I am trying the below code. I want to get the value for ‘network’ name.
I put a breakpoint System.out.println("test");
And there is nothing in selectPath.

What am I missing?

//mike

public static void main(String[] args) throws Exception {
              RpcReply newRpcReply = NetconfRpc.newRpcReply(reply());
              String expression = "$this/ericsson-sbg-function---n22-cl2-ims1-pcscf-1-1---1-6-0-931/pcscf/access-net-pcscf/network-name/text()";
              XmlObject[] selectPath = newRpcReply.toXmlObject().selectPath(expression);
              System.out.println("test");
       }

       private static String reply() {
              return "<rpc-reply xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\" message-id=\"272\">\r\n"
                           + "<data>\r\n"
                           + "    <ericsson-sbg-function---n22-cl2-ims1-pcscf-1-1---1-6-0-931 xmlns=\"urn:rdns:com:ericsson:oammodel:ericsson-sbg-function---n22-cl2-ims1-pcscf-1-1---1-6-0-931\">\r\n"
                           + "       <pcscf>\r\n"
                           + "         <access-net-pcscf>\r\n"
                           + "            <id>1</id>\r\n"
                           + "           <network-name>Access</network-name>\r\n"
                           + "       </access-net-pcscf>\r\n"
                            + "     </pcscf>\r\n"
                           + "</ericsson-sbg-function---n22-cl2-ims1-pcscf-1-1---1-6-0-931>\r\n"
                           + "</data>\r\n"
                           + "</rpc-reply>";
       }