Newbie question - retrieving data for Xpath
Added by Anonymous over 14 years ago
Legacy ID: #8452744 Legacy Poster: Whitburn (whitburn)
Apologies if my question is very basic, but I have no experience of XML or Java, so I'm struggling to get to grips with accessing XML data using Saxon. It's made even worse by having to access Java via PHP! Basically, I've got some XML and given an Xpath I want to return the associated data. I can do this fine in PHP for 1.0 Xpaths but I need to be able to cope with 2.0 Xpaths, thus the requirement to use Saxon. I think I understand how to get the XML in a format which Saxon can process: $oXmlJava = new java("java.io.StringReader",$xml_text); $oXmlSource = new java("javax.xml.transform.stream.StreamSource",$oXmlJava); Presumably I then need to convert $oXmlSource to a Saxon object and then process it with a compiled Xpath. I've looked through the "net.sf.saxon.xpath" classes, but I'm not really clear on how these should be used in this case. If someone could at least point me in the right direction then it would be very much appreciated.
Replies (1)
RE: Newbie question - retrieving data for Xpath - Added by Anonymous over 14 years ago
Legacy ID: #8454106 Legacy Poster: Michael Kay (mhkay)
Please see http://markmail.org/message/kdlhyjndt2vkvfsu
Please register to reply