Query an XML file like a recordset?
am 23.11.2005 20:20:09 von byron
With ASP can I query an XML file for a record, just like I would a
database table and fill the data values into variables?
I have a product list in XML and want to fill a web template with
individual product data. If the XML is structured like this:
blah blah blah
product.jpg
Can I load the XML once and run multiple productid queries on it within
one page?
Not that familiar with XML, but this would sure simplify things for me.
TIA.
Re: Query an XML file like a recordset?
am 23.11.2005 20:43:57 von reb01501
Byron wrote:
> With ASP can I query an XML file for a record, just like I would a
> database table and fill the data values into variables?
>
> I have a product list in XML and want to fill a web template with
> individual product data. If the XML is structured like this:
>
>
> blah blah blah
> product.jpg
>
>
> Can I load the XML once and run multiple productid queries on it
> within one page?
>
> Not that familiar with XML, but this would sure simplify things for
> me.
>
You can use XPath queries using the selectSingleNode and selectNodes methods
of the MSXML parser. Look them up in msdn.microsoft.com/library for examples
.... remember, XML is case-sensitive.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"