A
Abraham Khalil
Trying to write a function to get all values from a XML path without using a
third party XPath libraries
Using jdk1.4 and wondering if it supports XPaths?
If so would prefer that as a solution instead of writing a recursive one myself
Thanks
An example of a start that I'am trying below
public static String[] getValue(Document doc, String path) throws Exception {
String[] nodeNames = path.split("[\\/]");
for (int i = 0 ; i < nodeNames.length ; i++) {
String nodeName = nodeNames;
NodeList elements = doc.getElementsByTagName(nodeName);
}
}
third party XPath libraries
Using jdk1.4 and wondering if it supports XPaths?
If so would prefer that as a solution instead of writing a recursive one myself
Thanks
An example of a start that I'am trying below
public static String[] getValue(Document doc, String path) throws Exception {
String[] nodeNames = path.split("[\\/]");
for (int i = 0 ; i < nodeNames.length ; i++) {
String nodeName = nodeNames;
NodeList elements = doc.getElementsByTagName(nodeName);
}
}