Can't fetch the xml: roots element are missing

Discussion in 'ASP .Net' started by benclissen@gmail.com, Jan 15, 2006.

  1. Guest

    Hi,


    I want to do something simple read an xml and print out just 1 value.


    Now everytime I do this I got this "Root elements are missing"
    exception. I try it by using xmlreader, dataset or xpath; always the
    same error.


    I someone could help me out here and give me some possible causes (and
    hopefully solutions)


    Dim reader As New
    StreamReader("http://ww5.ethias.be/auto55.go?IMSTRAN=WA2017&CDOPTRN=A2A55&CDLGTRN=N...")



    While reader.Read
    If reader.Name = "QUOTEID" Then
    lblGARCI.Text = reader.Value
    End If
    End While


    The problem is on the first line.


    Thanks a bunch for your help,


    Regards,


    Ben
    , Jan 15, 2006
    #1
    1. Advertising

  2. Ben the error says:-"Root elements are missing" exception
    Try looking at your XML root document
    Or try pasting what your XML looks like
    Patrick
    <> wrote in message
    news:...
    > Hi,
    >
    >
    > I want to do something simple read an xml and print out just 1 value.
    >
    >
    > Now everytime I do this I got this "Root elements are missing"
    > exception. I try it by using xmlreader, dataset or xpath; always the
    > same error.
    >
    >
    > I someone could help me out here and give me some possible causes (and
    > hopefully solutions)
    >
    >
    > Dim reader As New
    >

    StreamReader("http://ww5.ethias.be/auto55.go?IMSTRAN=WA2017&CDOPTRN=A2A55&CD
    LGTRN=N...")
    >
    >
    >
    > While reader.Read
    > If reader.Name = "QUOTEID" Then
    > lblGARCI.Text = reader.Value
    > End If
    > End While
    >
    >
    > The problem is on the first line.
    >
    >
    > Thanks a bunch for your help,
    >
    >
    > Regards,
    >
    >
    > Ben
    >
    Patrick.O.Ige, Jan 16, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: Application Roots for assemblies

    Kevin Spencer, Jul 3, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    421
    Ian Turner
    Jul 4, 2003
  2. Carl Johansen

    Single vs multiple IIS application roots

    Carl Johansen, Jun 7, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,346
    Shimon Sim
    Jun 8, 2005
  3. Ian Pilcher
    Replies:
    0
    Views:
    400
    Ian Pilcher
    Jan 28, 2006
  4. Rob Smegma
    Replies:
    1
    Views:
    499
    Martin Honnen
    Nov 4, 2005
  5. HANM
    Replies:
    2
    Views:
    691
    Joseph Kesselman
    Jan 29, 2008
Loading...

Share This Page