xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Celinio Fernandes" <cfernandes.exte...@pagesjaunes.fr>
Subject Using XQuery with XMLbeans
Date Wed, 10 Aug 2005 17:58:27 GMT
Hi again,
I am new to XQuery and I am trying to select a value in my XML file
which looks a bit like this:
<?xml version="1.0" encoding="UTF-8"?>
<MPG-PVC xmlns:xsi=" <http://www.w3.org/2001/XMLSchema-instance>
 <DATE_ENVOI>07/08/2005 09:07:01</DATE_ENVOI>
    <LO_DA_CREATION>10/05/2005 10:07:14</LO_DA_CREATION>    

How do you get the value of LO_ID_EPJ ?

I tried this: (inputXMLFile is my XML file of course)
 MPGPVCDocument mpgpvcdoc = MPGPVCDocument.Factory.parse(inputXMLFile);

 String nsText = "declare namespace
 String pathText = "$this/xq:MPG-PVC/xq:EPJ/xq:IOS/xq:IO/xq:LO_ID_EPJ";

 String queryText = nsText + pathText;
 XmlCursor itemCursor = mpgpvcdoc.newCursor().execQuery(queryText);
 Result is :

instead of 751

Something wrong with my use of the XML elements ?

Thanks in advance for your help.



View raw message