Altova Mailing List Archives


Re: how get node attribute vlaue?

From: Mark Johnson <102334.12@----------.--->
To: NULL
Date: 8/29/2003 7:57:00 AM
"wmy" <asdf@h...> wrote:

>i want get node attribute value.
>pls help!
>thanks!
>follow code:
><employee name="zhang">
>    <address>changchun</address>
>    <country>China</country>
></employee>
><employee name="wang">
>    <address>beijing</address>
>    <country>China</country>
></employee>

Are you trying to create a node list of all attributes called, "name"?

//@*[local-name()='name']

If you are on an employee element node, if the context node, or
current node is one of the employee element nodes, then you can get
the attribute string value just by - @name


Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.