Google Answers Logo
View Question
 
Q: asp to read xml problem - stupid error msg, the data is there - can u fix? ( No Answer,   3 Comments )
Question  
Subject: asp to read xml problem - stupid error msg, the data is there - can u fix?
Category: Computers > Internet
Asked by: chris2002micrometer-ga
List Price: $5.00
Posted: 29 Jun 2004 19:45 PDT
Expires: 29 Jul 2004 19:45 PDT
Question ID: 367968
hi ho 22
<%@ LANGUAGE = VBScript %>
<?XML VERSION="1.0"?>
<BOOKTITLES>
<%
Set XML = Server.CreateObject("msxml")
XML.URL = "http://www.micrometer.com/micromtr/books.xml"
Set Items = XML.root.children
For I = 0 to Items.length - 1
%>
<ITEM>
 <TITLE><%=Items.item(I).children.item("TITLE").text%></TITLE>
</ITEM>
<%Next%>

<%
Set XML = Nothing
Set Items = Nothing
%>
</BOOKTITLES>


The URL of the above file is:
http://www.micrometer.com/micromtr/run.asp

When I run it I get:
hi ho 22

msxml3.dll error '800c0007'

No data is available for the requested resource.

/micromtr/run.asp, line 7

Request for Question Clarification by mathtalk-ga on 16 Jul 2004 12:33 PDT
Hi, Chris:

I think I'd code the DOM document loading this way:

Set xmldoc = CreateObject("MSXML2.DOMDocument")
xmldoc.async = false
xmldoc.setProperty("ServerHTTPRequest", true)
xmldoc.load("http://www.micrometer.com/micromtr/books.xml")

Would you care to try this approach and see if it works?

regards, matht
Answer  
There is no answer at this time.

Comments  
Subject: Re: asp to read xml problem - stupid error msg, the data is there - can u fix?
From: momad_the_nomad-ga on 16 Jul 2004 11:55 PDT
 
Have you tried actually paying attention to what the error says?  In
case you're getting a different error message then I am, here is what
im getting:

The name 'xml' is reserved and must be lower case. Error processing
resource 'http://www.micrometer.com/micromtr/run.asp'. Line 2,
Position 3

So, all you have to do is instead of:
<?XML VERSION="1.0"?>

change that line to:

<?xml version="1.0"?>

And it will work nicely.

BTW: I am not a Google Answers Researcher.
Subject: Re: asp to read xml problem - stupid error msg, the data is there - can u fix?
From: momad_the_nomad-ga on 16 Jul 2004 12:01 PDT
 
Also, Did you know that you can use a stylesheet to transform one XML
into another? Something along the lines of:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" />

<xsl:template match="/">
    <BOOKTITLES>
        <xsl:for-each select="/catalog/book">
            <ITEM>
                <TITLE>
                    <xsl:value-of select="title" />
                </TITLE>
            </ITEM>
        </xsl:for-each>
    </BOOKTITLES>
</xsl:template>

</xsl:stylesheet>

I hope that helps :-)
Subject: Re: asp to read xml problem - stupid error msg, the data is there - can u fix?
From: momad_the_nomad-ga on 16 Jul 2004 12:03 PDT
 
One last comment, get rid of the "hi ho 22" at the top of the file...

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy