Hi Hopefully someone can point me in the direction where I'm going wrong with this one: If I have the following XML: <a> <b> <c>val1</c> <d> <c>val2</c> </d> </b> <c>val3</c> </a> If I execute the following XQuery: .//b/c I would expect one result to come back, however, using xmlbeans 2.3, it seems to select the val2 c as well!? Here's a test class: public class TestSelectPath { public static void main(String[] args) { final XmlObject obj = XmlObject.Factory.parse("<a><b><c>val1</c><d><c>val2</c></d><c>val3</c>< /a>"); final XmlCursor c = obj.newCursor(); c.selectPath(".//b/c"); System.out.println(c.getSelectionCount()); c.dispose(); } } As far as I'm aware, it should only return one result. If I add the a in and don't use the // (./a/b/c) then I get the correct result. However, this approach isn't workable in my application. I'm running java 1.4, with xmlbeans-qname-2.3.0.jar, xmlbeans-2.3.0.jar and stax-api-1.0.1.jar on my classpath. Can anyone help?? Cheers Paul
This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory. The contents of this email may relate to dealings with other companies within the Detica Group plc group of companies. Detica Limited is registered in England under No: 1337451. Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.