Hello,
 
I use Xquery with Saxon.
My code is :
 
Configuration config = new Configuration();
        StaticQueryContext staticContext = new StaticQueryContext(config);
        try {
        XQueryExpression exp = staticContext.compileQuery("//racine");
        DynamicQueryContext dynamicContext = new DynamicQueryContext(config);
        dynamicContext.setContextNode(staticContext.buildDocument(
                    new StreamSource(new File("D:\\fichiersTest\\transform1.xml"))));
       SequenceIterator books = exp.iterator(dynamicContext);
       while (true) {
            Item book = books.next();
            if (book==null) break;
            vCalculValue = book.getStringValue();
            System.out.println(vCalculValue);}
 
This is run correctly but i would like an Xml Struct and not just the value in my final variable . i would like "<book>XML book</book>" and not just "XML book"
 
Is it a solution?
 
thks
 
benjamin 
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.