xml-xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Loberg, Sven G." <Sven.Lob...@BELLSOUTH.COM>
Subject Support for XQuery FLWR statements with XMLBeans
Date Tue, 27 Jul 2004 13:29:20 GMT
> All-
> 
> Does XMLBeans support the full XQuery specification or just basic
> query expressions. I've seen postings stating that if you include the
> xqrl.jar you can use BEA's proprietary XQuery engine with XMLBeans. If
> XMLBeans does fully support fully XQuery (with the addition of
> xqrl.jar), are standard FLWR statements supported?
> 
> Thanks,
> 
> Sven
> 
>  -----Original Message-----
> From: 	Loberg, Sven G.  
> Sent:	Friday, July 23, 2004 3:45 PM
> To:	'xmlbeans-user@xml.apache.org'
> Subject:	Using Xquery with XmlObjects and XmlCursor: Filtering
> Out Child Elements
> 
> Does XmlCursor.execQuery() support the ability to filter out specific
> nested child elements to return a subset of child elements within an
> XmlObject using the execQuery method. Or vice versa be able to specify
> a subset of nested child elements to be returned (similar to a SQL
> statement of "SELECT SuccessCode_Field, User_Field FROM
> TestRequest_Table). 
> 
> For example:
> 
> An XmlObject "unfilteredDoc" with the following structure:
> 
> <TestRequest xmlns="com/ci/services/TestResponseV1">
> 	<SuccessCode>true</SuccessCode>
> 	<Message>This a test.</Message>
> 	<User>Test_User</User>
> </TestRequest>
> 
> Desired Result:
> 
> <TestRequest xmlns="com/ci/services/TestResponseV1\">
> 	<SuccessCode>true</SuccessCode>
> 	<User>Test_User</User>
> </TestRequest>
> 
> // ---- Code ----
> 
> XmlCursor empCursor = unfilteredDoc.newCursor();
> 
> XmlCursor resultCursor = empCursor.execQuery(queryExpression);
> 
> if (!(resultCursor.getTextValue().trim().equals("")))
> {
>        filteredDoc = resultCursor.getObject();
> 
>        // dispose of the result cursor
>               resultCursor.dispose();
> }
> 
> I appreciate your suggestions...
> 
> Thanks,
> 
> Sven

Mime
View raw message