[XML4Lib] needed: 1 xpath expression

Galen Charlton gmcharlt at gmail.com
Wed May 21 15:48:44 EDT 2008


Hi,

On Wed, May 21, 2008 at 2:39 PM, Eric Lease Morgan <emorgan at nd.edu> wrote:
> Given the following XML snippet, how can I extract the value of the 100
> field, subfield a:
>
[snip]
>
> I'd be willing to bet there is a one-liner lurking somewhere here.

There are a lot of one-liners.  Here's one that doesn't care what
wraps around varfield:

//varfield[@id='100']/subfield[@label='a']/text()

Regards,

Galen
LibLime




More information about the XML4Lib mailing list