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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP and xml

Status
Not open for further replies.

transparent

Programmer
Sep 15, 2001
333
GB
I have the following xml:

<content>
<story>
<file>news2002061001.xml</file>
<folder>music</folder>
<published>no</published>
</story>

<story>
<file>news2002010001.xml</file>
<folder>political</folder>
<published>no</published>
</story>

</content>

I need to select a story with a specific file name. I tried:

Set obj_XML = GetXMLDoc(&quot;xml/content.xml&quot;)

set obj_XMLContent = obj_XML.documentElement
set obj_XMLField = obj_XMLContent.selectSingleNode(&quot;story[@file='&quot; & str_XMLFilename & &quot;']&quot;)


Any ideas whats wrong? What code should I use?
 
try changing

Set obj_XMLField = obj_XMLContent.selectSingleNode(&quot;story[@file='&quot; & str_XMLFilename & &quot;']&quot;)

to

Set obj_XMLField = obj_XMLContent.selectSingleNode(&quot;story[file=[COLOR=red]'[/color]&quot; & str_XMLFilename & &quot;']&quot;)

if that does not work, try

Set obj_XMLField = obj_XMLContent.selectSingleNode(&quot;story[file=[COLOR=green]&quot;&quot;[/color]&quot; & str_XMLFilename & &quot;&quot;&quot;]&quot;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top