code: public static void main(String[] args) {
          String xml = "<Ping xmlns:ps='http:'><G a='8'><ps:H> asf\n</ps:H></G><ps:EventName>START</ps:EventName></Ping>";
          String path_string = "//G[H=asf]";
          try {
              XmlObject xmlBean = XmlObject.Factory.parse(xml);
              XmlPath path = new XmlPath(path_string);
              String value = path.evaluate(xmlBean);
              System.out.println("Value=" + value);
          } catch (Exception ex) {
              ex.printStackTrace();
          }
      }
docs: Test code
  @param args