A
ayo991
I am having a problem parsing XML into ASP. I have the follow XML
code from a server that reads
"<?xml version="1.0" encoding="UTF-8" ?>
- <ISBNdb server_time="2007-09-13T15:11:08Z">
- <BookList total_results="1" page_size="10" page_number="1"
shown_results="1">
- <BookData book_id="paul_laurence_dunbar_portrait_of_a_poet"
isbn="0766013502">
<Title>Paul Laurence Dunbar</Title>
<TitleLong>Paul Laurence Dunbar: portrait of a poet</TitleLong>
<AuthorsText>Catherine Reef</AuthorsText>
<PublisherText publisher_id="enslow_publishers">Berkeley Heights,
NJ : Enslow Publishers, c2000.</PublisherText>
<Details dewey_decimal="811/.4" physical_description_text="128 p. :
ill. ; 24 cm." language="eng" edition_info=""
dewey_decimal_normalized="811.4" lcc_number="PS1557"
change_time="2005-04-03T07:24:51Z" price_time="2007-09-13T11:53:16Z" /</BookData>
</BookList>
</ISBNdb>"
and here is my code
"<%
Dim xmlDoc
set xmlDoc = createObject("MSXML2.DOMDocument")
xmlDoc.async = False
xmlDoc.setProperty "ServerHTTPRequest", true
xmlDoc.load("http://XXXX.com//api/books.xml?
access_key=X&results=details&index1=isbn&value1=0766013502")
response.write xmldoc.documentelement.childnodes(0).Text
%>"
that displays
"Paul Laurence Dunbar Paul Laurence Dunbar: portrait of a poet
Catherine Reef Berkeley Heights, NJ : Enslow Publishers, c2000."
The problem that I am having is that I want it to break the xml up
into the individual categories with a response.write. Such as
Title: Paul Laurence Dunbar
Author: Catherine Reef
and so on. I cannot figure out what I need to do to display this
correctly. I have tried to change this
"xmlDoc.selectSingleNode("/SBNdb /BookList/
BootData").Attributes.GetNamedItem("Title").Text "
but I am not having any luck. Any help would be greatly appreciated.
code from a server that reads
"<?xml version="1.0" encoding="UTF-8" ?>
- <ISBNdb server_time="2007-09-13T15:11:08Z">
- <BookList total_results="1" page_size="10" page_number="1"
shown_results="1">
- <BookData book_id="paul_laurence_dunbar_portrait_of_a_poet"
isbn="0766013502">
<Title>Paul Laurence Dunbar</Title>
<TitleLong>Paul Laurence Dunbar: portrait of a poet</TitleLong>
<AuthorsText>Catherine Reef</AuthorsText>
<PublisherText publisher_id="enslow_publishers">Berkeley Heights,
NJ : Enslow Publishers, c2000.</PublisherText>
<Details dewey_decimal="811/.4" physical_description_text="128 p. :
ill. ; 24 cm." language="eng" edition_info=""
dewey_decimal_normalized="811.4" lcc_number="PS1557"
change_time="2005-04-03T07:24:51Z" price_time="2007-09-13T11:53:16Z" /</BookData>
</BookList>
</ISBNdb>"
and here is my code
"<%
Dim xmlDoc
set xmlDoc = createObject("MSXML2.DOMDocument")
xmlDoc.async = False
xmlDoc.setProperty "ServerHTTPRequest", true
xmlDoc.load("http://XXXX.com//api/books.xml?
access_key=X&results=details&index1=isbn&value1=0766013502")
response.write xmldoc.documentelement.childnodes(0).Text
%>"
that displays
"Paul Laurence Dunbar Paul Laurence Dunbar: portrait of a poet
Catherine Reef Berkeley Heights, NJ : Enslow Publishers, c2000."
The problem that I am having is that I want it to break the xml up
into the individual categories with a response.write. Such as
Title: Paul Laurence Dunbar
Author: Catherine Reef
and so on. I cannot figure out what I need to do to display this
correctly. I have tried to change this
"xmlDoc.selectSingleNode("/SBNdb /BookList/
BootData").Attributes.GetNamedItem("Title").Text "
but I am not having any luck. Any help would be greatly appreciated.