Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Attribute

Status
Not open for further replies.

Chance1234

IS-IT--Management
Jul 25, 2001
7,871
US
Mind has gone blank i have the following

<MAIL item='A'>
<to>BOB</to>

</MAIL>
<MAIL item='B'>
<to>Sid</to>
</MAIL>

i then have the following vbscript

Dim xmldoc
dim XLItem
set xmlDoc=CreateObject(&quot;Microsoft.XMLDOM&quot;)
XMLDoc.Load (&quot;c:\ClientResourcing_eMail_Text.xml&quot;)


For each xlitem in xmldoc.documentElement.childNodes
msgbox xlitem.nodename
msgbox xlitem.text
next

which returns
MAIL
BOB
MAIL
SID

no problem , but what i want to return is the attribute value



Filmmaker, gentleman and pearls before swine fan

 
This should get you the attribute value...

xmlitem.attributes.getNamedItem(&quot;item&quot;).text

Ignorance can be cured.
Stupidity you're born with.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top