commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markos Charatzas <x...@forthnet.gr>
Subject Re: [jxpath] retrieving sub xml
Date Tue, 14 Jun 2005 08:26:11 GMT
Maybe it requires some clarification.

When I say rich formattted text, I get all the values evaluated by the xpath 
expression, but without the tags. Just tab, return characters and values of 
tags.

e.g. in an xml of
<persons>
	<person>
		<name>foo</name>
		<age>20</age>
	</person>
	<person>
		<name>bar</name>
		<age>25</age>
	</person>
		<name>foobar</name>
		<age>20</age>
</persons>

I want to retrieve just all <person> elements with age = 20 
(xpath "persons/person[age=20]")

Is it feasible using the jxpath API?

Thanks in advance,
Markos

On Monday 13 June 2005 12:36, Markos Charatzas wrote:
> Hi there,
>
> Is it possible to retrieve a subset of an XML document using the jxpath
> api? The JXPathContext#getValue(String) method returns it in rich formatted
> text.
>
> Thanks in advance,
> Markos Charatzas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message