Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Wed, 27 Aug 2008 08:04:01 -0700,    group: microsoft.public.inetsdk.programming.scripting.vbscript        back       


read attribute values from a xml file using VB scripting (Q.T.P)   
<CorrRuleConfig>
<tag name="DeploymentId" value="158E3C70-41D9-102B-816F-000FFE05A415"/>
<tag name="Active" value="1"/>
<tag name="EngineId" value="158E3C70-41D9-102B-816C-000FFE05A415"/>
<tag name="DateModified" value="1219817541577"/>
<tag name="DateCreated" value="1219817541577"/>
<tag name="Name" value="SD_036"/>
<tag name="RuleDefinitionId" value="E2916F30-5543-102B-8421-000FFE05A415"/>
<tag name="Id" value="E2916F30-5543-102B-8421-000FFE05A415"/>
<CorrActions/>
</CorrRuleConfig>

i am trying to retrive the value of the attributes like 
"DateModified"....."DateCreated" from the above xml file...As the tag names 
are identical..i am unable to find the attribute values
date: Wed, 27 Aug 2008 08:04:01 -0700   author:   dyashwanthv

Re: read attribute values from a xml file using VB scripting (Q.T.P)   
"dyashwanthv"  wrote in message 
news:60F5FF25-A0E3-4C35-807A-5B13C3F7C094@microsoft.com...
> <CorrRuleConfig>
> <tag name="DeploymentId" value="158E3C70-41D9-102B-816F-000FFE05A415"/>
> <tag name="Active" value="1"/>
> <tag name="EngineId" value="158E3C70-41D9-102B-816C-000FFE05A415"/>
> <tag name="DateModified" value="1219817541577"/>
> <tag name="DateCreated" value="1219817541577"/>
> <tag name="Name" value="SD_036"/>
> <tag name="RuleDefinitionId" 
> value="E2916F30-5543-102B-8421-000FFE05A415"/>
> <tag name="Id" value="E2916F30-5543-102B-8421-000FFE05A415"/>
> <CorrActions/>
> </CorrRuleConfig>
>
> i am trying to retrive the value of the attributes like
> "DateModified"....."DateCreated" from the above xml file...As the tag 
> names
> are identical..i am unable to find the attribute values
You should be using XML via msxml:
Load document into a DomDocument
Use SelectSingleNode with XPath such as "/*/tag[@name = 
'DateModified']/@value"
Read the nodeValue of the retrieved node.

Example: http://msdn.microsoft.com/en-us/library/ms757846(VS.85).aspx

(That is for msxml2.domdocument.3.0, you should use msxml2.domdocument.6.0 
if you have it installed.)

-- 

Joe Fawcett (MVP - XML)

http://joe.fawcett.name
date: Thu, 28 Aug 2008 09:21:20 +0100   author:   Joe Fawcett am

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us