Any XML and ASP gurus out there ? Need help ...

kuk

Platinum Member
Jul 20, 2000
2,925
0
0
I'm trying to build a XML-driven database of news articles, but I can't seem to find any info on the web.

I want the XML file to be parsed on the server, and not on the client, using ASP, but I can't find the command to do this. I know it's possible ...

Here's what I have for the .xml file:

<?xml version=&quot;1.0&quot;?>
<main>

<title>News Title</title>
<author>Me</author>
<subject>Hardware</subject>
<summary>A summary of the article</summary>

<page n=&quot;_1&quot;>
<pagetitle>Introduction</pagetitle>
<text><![CDATA[Blah blah blah
<p>Insert HTML here</p]]></text>
</page>

<page n=&quot;_2&quot;>
<pagetitle>Conclusion</pagetitle>
<text><![CDATA[Blah blah blah
<p>Insert HTML here</p]]></text>
</page>

</main>



I want the .asp file to retrieve this information acording to what is asked to be done. For example, retrieve just the Title, Author and the contents of Page 2, and place them inside variables, that would latter be written as <% response.write(Title) %>.

Anyone care to help ? :)
 

Turkey

Senior member
Jan 10, 2000
839
0
0
I'm pretty sure the typical way of doing this is to create an XSL sheet, instantiate something like a microsoft.FreeThreadedXMLDOM using server.createobject, then call one of its methods, the name is something like transformNodeToObject. You may want to bookmark this page.
 

joohang

Lifer
Oct 22, 2000
12,340
1
0
FYI, you don't use XSL for what kuk is trying to do. You use the XML DOM to move through different hierarchy using XPath.