Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] How to read attribute value from Nodes class.

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT ibiblio.org>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] How to read attribute value from Nodes class.
  • Date: Thu, 3 May 2012 14:31:12 -0400

On Thu, May 3, 2012 at 8:55 AM, Kunal Chauhan <mail4ck AT gmail.com> wrote:
> Hi,
>
> now I get result as a Nodes.
>
> for eg. <product id='101'></product>
>
> so, how can I retrive id attribute from Nodes class ?
>

You need to select a particular Node from the Nodes you get back and
cast it to an Element. There may be more than one of these, of course.

Or you could change your XQuery to select the attribute you want in
the first place.

--
Elliotte Rusty Harold
elharo AT ibiblio.org




Archive powered by MHonArc 2.6.24.

Top of Page