Perfect. That solves my problem. Sorry about the goofy problem.

tcp

-----Original Message-----
From: Christian Nentwich [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 10:46 AM
To: Tom Preston
Cc: [EMAIL PROTECTED]
Subject: Re: [Jaxen] using [@name] inside of JAXEN



> While dynamically trying to retrieve an Attribute value using Jaxen...I
find
> that I have a problem.  I have to "KNOW" within my program that I have
> searched for an Attribute as opposed to an Element.  This is because the

>             XPath xpath = new XPath( "/TRIPS/TRIP/VACATION_ID[@name]");

I'm not sure I understodd you correctly at all, but your path is wrong
if you are looking for an attribute. You should use
/TRIPS/TRIP/VACATION_ID/@name instead of /TRIPS/TRIP/VACATION_ID[@name]

What you are doing is returning all VACATION_ID elements that have a
name attribute instead of returning the attribute nodes.

Christian


_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to