Help displaying poorly formed XML document

T

TheDude5B

HI,

So I need some help displaying this XML feed using asp.net. Personally
I feel that this XML document is poorly formed but unfortunetaly I do
not have control over it.

the XML document is formed like this

<clubgig>
<HULL>
<venue>The Welly</venue>
<address>105-107 Beverley Road, Hull</address>
<url />
<gig>20th September 2007 - The Runners</gig>
<gig>27th September 2007 - WinterKids</gig>
</HULL>
<LONDON>
<venue>KOKO</venue>
<address>1A Camden High Street, London</address>
<url>http://www.koko.uk.com</url>
<gig>12th October 2007 - The Alones</gig>
<gig>19th October 2007 - The Outside Royalty</gig>
<gig>21st September 2007 - The Dead 60s</gig>
<gig>21st September 2007 - One Night Only</gig>
<gig>26th October 2007 - Help She Can't Swim</gig>
<gig>28th September 2007 - Remi Nicole</gig>
<gig>28th September 2007 - The Steers</gig>
<gig>5th October 2007 - Nine Black Alps</gig>
<gig>5th October 2007 - The Ads</gig>
</LONDON>
<LUTON>
<venue>The Live Room at Charlie Browns</venue>
<address>114 Midland Road Luton</address>
<url>http://www.myspace.com/lutonclubnme</url>
<gig>21st September 2007 - The Teenagers</gig>
<gig>21st September 2007 - Help She Can't Swim</gig>
</LUTON>
<SHEFFIELD>
<venue>The Plug</venue>
<address>14-16 Matilda Street, Sheffield</address>
<url>http://www.the-plug.com</url>
<gig>27th September 2007 - Remi Nicole</gig>
<gig>27th September 2007 - Oh No Ono</gig>
</SHEFFIELD>
<STOKE_ON_TRENT>
<venue>The Underground</venue>
<address>The Underground, Morley Street, Hanley</address>
<url />
<gig>15th September 2007 - The Tigerpicks</gig>
<gig>22nd September 2007 - One Night Only</gig>
</STOKE_ON_TRENT>
</clubgig>

I am able to play around with XML coding when to document if formed
properly, but when it comes to this I dont have a clue.

Can someone help me out here?

Thanks,
 
P

Patrice

Please be more specific about the problem you have. First, does it load
correctly or it is reported as an invalid XML document ?
 
T

TheDude5B

Please be more specific about the problem you have. First, does it load
correctly or it is reported as an invalid XML document ?

--
Patrice

"TheDude5B" <[email protected]> a écrit dans le message de (e-mail address removed)...










- Show quoted text -

It does not come up with an error of a poorly formed document, but I
think because the tags within <clubgig> are all different, there is
something wrong.

I have a bit of code:


Dim strURL As String = "http://www.nme.com/clubnmerss"
Dim reader As XmlTextReader = New XmlTextReader(strURL)
Dim ds As New DataSet
ds.ReadXml(reader)
Me.GridView1.DataSource = ds
Me.GridView1.DataBind()


all that out puts is the first venue and address.
 
P

Patrice

Ah ok. It's much easier to help when knowing what you try to do ;-)

Your best bet is IMO to take over and create the dataset structure by
yourself by reading this as an XmlDocument and by browsing the nodes.
AFAIKthis document won't ever be able to be processed by the dataset
structure inference rules because of its quite bad structure....

--
Patrice

"TheDude5B" <[email protected]> a écrit dans le message de
(e-mail address removed)...
Please be more specific about the problem you have. First, does it load
correctly or it is reported as an invalid XML document ?

--
Patrice

"TheDude5B" <[email protected]> a écrit dans le message de (e-mail address removed)...










- Show quoted text -

It does not come up with an error of a poorly formed document, but I
think because the tags within <clubgig> are all different, there is
something wrong.

I have a bit of code:


Dim strURL As String = "http://www.nme.com/clubnmerss"
Dim reader As XmlTextReader = New XmlTextReader(strURL)
Dim ds As New DataSet
ds.ReadXml(reader)
Me.GridView1.DataSource = ds
Me.GridView1.DataBind()


all that out puts is the first venue and address.
 
T

TheDude5B

Ah ok. It's much easier to help when knowing what you try to do ;-)

Your best bet is IMO to take over and create the dataset structure by
yourself by reading this as an XmlDocument and by browsing the nodes.
AFAIKthis document won't ever be able to be processed by the dataset
structure inference rules because of its quite bad structure....

--
Patrice

"TheDude5B" <[email protected]> a écrit dans le message de (e-mail address removed)...



It does not come up with an error of a poorly formed document, but I
think because the tags within <clubgig> are all different, there is
something wrong.

I have a bit of code:

Dim strURL As String = "http://www.nme.com/clubnmerss"
Dim reader As XmlTextReader = New XmlTextReader(strURL)
Dim ds As New DataSet
ds.ReadXml(reader)
Me.GridView1.DataSource = ds
Me.GridView1.DataBind()

all that out puts is the first venue and address.- Hide quoted text -

- Show quoted text -

Yeah that is what I was thinking. At least it is not just me then that
thinks the XML document has a bad structure!

I was thinking of using the XmlTextReader and then stepping through
this with the reader.Read() method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,084
Latest member
HansGeorgi

Latest Threads

Top