Microsoft XML Parser

wxdqz

New Member
I am parsing am XML file a retriving some information that I need. I am ableto traverse the tree and get all the information that I need. The only problemthat I am getting is that the XML file that I get has a line that is linkedto the schema of the XML file that I am usinf if a take that line alway itworks fine.But if I leave it my code would not work.This is my code:For Each pageNode in rootNodePho.childNodesif i < 5 thenIf pageNode.nodename = "Gallery" thenFor Each propertyNode in pageNode.childNodesIf propertyNode.nodeName = "Image_URL" ThenImageSr = propertyNode.TextEnd IfIf propertyNode.nodeName = "TITLE" ThenPhotoTitle = propertyNode.TextEnd IfIf propertyNode.nodeName = "Gallery_URL" ThenImageURL = propertyNode.TextResponse.Write("<TD ALIGN=Center><IMG SRC=http://forums.devx.com/archive/index.php/" + ImageSr + " WIDTH=50 HEIGHT=50><FONTFACE=Verdana, Arial, Helvetica SIZE=1><BR>")Response.Write("<B></B><A HREF=" + ImageURL + ">")Response.Write( PhotoTitle + "</A><BR>")Response.Write("</FONT></TD>")End IfNextEnd Ifend ifi = i + 1NextAnd this is the XML file:If I replace the <Music_News xmlns="x-schema:Music_News_Schema.xm> with <Music_News> it works<?xml version="1.0" ?><!-- RS Music News --><Music_News ><Rollingstone_News>http://rollingstone.tunes.com/sections/recordings/text/default.asp/?from=acam</Rollingstone_News><News><ARTIST>Korn</ARTIST><CAPTION1>Korn Set Summer Tour Dates</CAPTION1><CAPTION2>Afteropening for Metallica, Korn to launch tour with Powerman 5000</CAPTION2><DATE>06/19/2000</DATE><IMAGE_CAPTION1>Takingtheir issues on the road</IMAGE_CAPTION1><Image_URL>http://rollingstone.tunes.com/content/artists/k/Korn/images/IM076984.jpg</Image_URL><Article_URL>http://rollingstone.tunes.com/sections/news/text/newsarticle.asp?afl=acam&NewsID=11099&ArtistID=39</Article_URL></News><News><ARTIST>No Doubt</ARTIST><CAPTION1>Tube Rock</CAPTION1><CAPTION2>A weeklyguide to rock and rap on the small screen, courtesy of <AHREF="http://www.musicstation.com/rockontv">RockOnTV</A></CAPTION2><DATE>06/19/2000</DATE><IMAGE_CAPTION1>NoDoubt stop in at <I>The Late Show With David Letterman</I> Wednesday.</IMAGE_CAPTION1><Image_URL>http://rollingstone.tunes.com/content/artists/n/No_Doubt/images/IM076998.jpg</Image_URL><Article_URL>http://rollingstone.tunes.com/sections/news/text/newsarticle.asp?afl=acam&NewsID=11102&ArtistID=77</Article_URL></News><News_COUNT>2</News_COUNT></Music_News>
 
Back
Top