System error when loading xml document

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simon Jefferies

    System error when loading xml document

    Hello,

    When I load an XML document using the LoadXml function, I get a "System
    error" exception raised.

    What causes this? the XML document is valid.

    Regards
    Simon Jefferies
    Tools Programmer, Headfirst Productions
    mailto:simonj@h eadfirst.co.uk
    www.callofcthulhu.com www.deadlandsgame.com
    -


  • Martin Honnen

    #2
    Re: System error when loading xml document



    Simon Jefferies wrote:

    [color=blue]
    > When I load an XML document using the LoadXml function, I get a "System
    > error" exception raised.
    >
    > What causes this? the XML document is valid.[/color]

    LoadXml doesn't validate at all so validity is not relevant.
    I guess you do not get the System error with any attempt to use LoadXml
    but with a specific input string parameter. Could you post that here if
    it is short or otherwise maybe put it in a text file, upload that to a
    server and post the URL?
    Also tell us whether you are using .NET 1.0 or 1.1.

    --

    Martin Honnen


    Comment

    • Martin Honnen

      #3
      Re: System error when loading xml document



      Simon Jefferies wrote:

      [color=blue]
      > When I load an XML document using the LoadXml function, I get a "System
      > error" exception raised.
      >
      > What causes this? the XML document is valid.[/color]

      LoadXml doesn't validate at all so validity is not relevant.
      I guess you do not get the System error with any attempt to use LoadXml
      but with a specific input string parameter. Could you post that here if
      it is short or otherwise maybe put it in a text file, upload that to a
      server and post the URL?
      Also tell us whether you are using .NET 1.0 or 1.1.

      --

      Martin Honnen


      Comment

      • Steven Cheng[MSFT]

        #4
        Re: System error when loading xml document

        Hi Simon,

        I've test the Xml file you provided. It seems that the cause is just the
        XML file is not valid event not well-formed. Generally, we can first open a
        xml file in IE browser to see whether it can be correctly displayed so as
        to confirm whether it is well-formed.

        #Checking for Well-Formed and Valid XML
        Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

        edvalidxml.asp? frame=true

        #Well-Formed XML Creation with the XmlTextWriter
        Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

        tionWithXmlText Writer.asp?fram e=true

        After that we can use api to processing the XML document. I've attached the
        modified Xml file in this message. Please have a check to see whether it
        works. Thanks.

        Regards,

        Steven Cheng
        Microsoft Online Support

        Get Secure! www.microsoft.com/security
        (This posting is provided "AS IS", with no warranties, and confers no
        rights.)

        Get Preview at ASP.NET whidbey
        Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.



        Comment

        • Steven Cheng[MSFT]

          #5
          Re: System error when loading xml document

          Hi Simon,

          I've test the Xml file you provided. It seems that the cause is just the
          XML file is not valid event not well-formed. Generally, we can first open a
          xml file in IE browser to see whether it can be correctly displayed so as
          to confirm whether it is well-formed.

          #Checking for Well-Formed and Valid XML
          Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

          edvalidxml.asp? frame=true

          #Well-Formed XML Creation with the XmlTextWriter
          Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

          tionWithXmlText Writer.asp?fram e=true

          After that we can use api to processing the XML document. I've attached the
          modified Xml file in this message. Please have a check to see whether it
          works. Thanks.

          Regards,

          Steven Cheng
          Microsoft Online Support

          Get Secure! www.microsoft.com/security
          (This posting is provided "AS IS", with no warranties, and confers no
          rights.)

          Get Preview at ASP.NET whidbey
          Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.



          Comment

          • Simon Jefferies

            #6
            Re: System error when loading xml document

            Hello,

            I'm a bit confused as I've tried the original XML file in IE and it loads
            correctly and I've stripped it down to the root item and it still fails.

            I've looked at the attachment you've added, what did you change as I
            couldn't see any changes in it?

            Thanks
            Simon Jefferies
            Tools Programmer, Headfirst Productions
            mailto:simonj@h eadfirst.co.uk
            www.callofcthulhu.com www.deadlandsgame.com
            -
            "Steven Cheng[MSFT]" <v-schang@online.m icrosoft.com> wrote in message
            news:IAqovkqTEH A.304@cpmsftngx a10.phx.gbl...[color=blue]
            > Hi Simon,
            >
            > I'm sorry to miss the attachment in the last message. Here is the xml file
            > in attachement. Thanks.
            >
            > Regards,
            >
            > Steven Cheng
            > Microsoft Online Support
            >
            > Get Secure! www.microsoft.com/security
            > (This posting is provided "AS IS", with no warranties, and confers no
            > rights.)
            >
            > Get Preview at ASP.NET whidbey
            > http://msdn.microsoft.com/asp.net/whidbey/default.aspx
            >[/color]


            Comment

            • Simon Jefferies

              #7
              Re: System error when loading xml document

              Hello,

              I'm a bit confused as I've tried the original XML file in IE and it loads
              correctly and I've stripped it down to the root item and it still fails.

              I've looked at the attachment you've added, what did you change as I
              couldn't see any changes in it?

              Thanks
              Simon Jefferies
              Tools Programmer, Headfirst Productions
              mailto:simonj@h eadfirst.co.uk
              www.callofcthulhu.com www.deadlandsgame.com
              -
              "Steven Cheng[MSFT]" <v-schang@online.m icrosoft.com> wrote in message
              news:IAqovkqTEH A.304@cpmsftngx a10.phx.gbl...[color=blue]
              > Hi Simon,
              >
              > I'm sorry to miss the attachment in the last message. Here is the xml file
              > in attachement. Thanks.
              >
              > Regards,
              >
              > Steven Cheng
              > Microsoft Online Support
              >
              > Get Secure! www.microsoft.com/security
              > (This posting is provided "AS IS", with no warranties, and confers no
              > rights.)
              >
              > Get Preview at ASP.NET whidbey
              > http://msdn.microsoft.com/asp.net/whidbey/default.aspx
              >[/color]


              Comment

              • Steven Cheng[MSFT]

                #8
                Re: System error when loading xml document

                Hi Simon,

                Here is the original Xml file you've attached:
                =============== ============
                <Items>
                <Item Type="MenuSyste mPage">
                <MenuSystemObje ct Name="Unnamed Page" />
                <MenuSystemPa ge ID="1">
                <MenuSystemPage Item RefID="2" X="0.5" Y="0.5" Width="0.5"
                Height="0.5">
                <Normal EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                <NormalColor1 Red="205" Green="205" Blue="205" Alpha="205" />
                <NormalColor2 Red="205" Green="205" Blue="205" Alpha="205" />
                </Normal>
                <Focused EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                <FocusedColor 1 Red="205" Green="205" Blue="205" Alpha="205" />
                <FocusedColor 2 Red="205" Green="205" Blue="205" Alpha="205" />
                </Focused>
                <Selected EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                <SelectedColo r1 Red="205" Green="205" Blue="205" Alpha="205" />
                <SelectedColo r2 Red="205" Green="205" Blue="205" Alpha="205" />
                </Selected>
                </MenuSystemPageI tem>
                </MenuSystemPage>
                </Item>
                <Item Type="MenuSyste mText">
                <MenuSystemObje ct Name="Unnamed Item" />
                <MenuSystemIt em ID="2" />
                <MenuSystemTe xt LanguageFilenam e="" LanguageID="0"
                LastLanguageTex t="HELLO WORLD" />
                </Item>
                </Item

                =============== =============== ============

                The end tag of the root element has been corrupt and after correct it, I
                can load it correctly. I test via C# code. Can you correctly load the
                XmlDocument via C# code? Or is there anything else cause the problem?
                Please have a try and let me know if you have any futher finding. Thanks.

                Regards,

                Steven Cheng
                Microsoft Online Support

                Get Secure! www.microsoft.com/security
                (This posting is provided "AS IS", with no warranties, and confers no
                rights.)

                Get Preview at ASP.NET whidbey
                Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.



                Comment

                • Steven Cheng[MSFT]

                  #9
                  Re: System error when loading xml document

                  Hi Simon,

                  Here is the original Xml file you've attached:
                  =============== ============
                  <Items>
                  <Item Type="MenuSyste mPage">
                  <MenuSystemObje ct Name="Unnamed Page" />
                  <MenuSystemPa ge ID="1">
                  <MenuSystemPage Item RefID="2" X="0.5" Y="0.5" Width="0.5"
                  Height="0.5">
                  <Normal EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                  ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                  UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                  <NormalColor1 Red="205" Green="205" Blue="205" Alpha="205" />
                  <NormalColor2 Red="205" Green="205" Blue="205" Alpha="205" />
                  </Normal>
                  <Focused EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                  ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                  UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                  <FocusedColor 1 Red="205" Green="205" Blue="205" Alpha="205" />
                  <FocusedColor 2 Red="205" Green="205" Blue="205" Alpha="205" />
                  </Focused>
                  <Selected EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                  ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                  UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                  <SelectedColo r1 Red="205" Green="205" Blue="205" Alpha="205" />
                  <SelectedColo r2 Red="205" Green="205" Blue="205" Alpha="205" />
                  </Selected>
                  </MenuSystemPageI tem>
                  </MenuSystemPage>
                  </Item>
                  <Item Type="MenuSyste mText">
                  <MenuSystemObje ct Name="Unnamed Item" />
                  <MenuSystemIt em ID="2" />
                  <MenuSystemTe xt LanguageFilenam e="" LanguageID="0"
                  LastLanguageTex t="HELLO WORLD" />
                  </Item>
                  </Item

                  =============== =============== ============

                  The end tag of the root element has been corrupt and after correct it, I
                  can load it correctly. I test via C# code. Can you correctly load the
                  XmlDocument via C# code? Or is there anything else cause the problem?
                  Please have a try and let me know if you have any futher finding. Thanks.

                  Regards,

                  Steven Cheng
                  Microsoft Online Support

                  Get Secure! www.microsoft.com/security
                  (This posting is provided "AS IS", with no warranties, and confers no
                  rights.)

                  Get Preview at ASP.NET whidbey
                  Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.



                  Comment

                  • Simon Jefferies

                    #10
                    Re: System error when loading xml document

                    Thanks for your reply,
                    [color=blue]
                    > The end tag of the root element has been corrupt and after correct it, I
                    > can load it correctly. I test via C# code. Can you correctly load the
                    > XmlDocument via C# code? Or is there anything else cause the problem?
                    > Please have a try and let me know if you have any futher finding. Thanks[/color]

                    I have no corruption at my end on the end tag of the root element, I have
                    created a basic XML file containing just the following:

                    <Items></Items>

                    and this failed too.

                    I get a problem with reading the file using VB, C# and Managed C++ code.

                    Regards
                    Simon Jefferies
                    Tools Programmer, Headfirst Productions
                    mailto:simonj@h eadfirst.co.uk
                    www.callofcthulhu.com www.deadlandsgame.com
                    -
                    "Steven Cheng[MSFT]" <v-schang@online.m icrosoft.com> wrote in message
                    news:PuYsqJ3TEH A.2764@cpmsftng xa10.phx.gbl...[color=blue]
                    > Hi Simon,
                    >
                    > Here is the original Xml file you've attached:
                    > =============== ============
                    > <Items>
                    > <Item Type="MenuSyste mPage">
                    > <MenuSystemObje ct Name="Unnamed Page" />
                    > <MenuSystemPa ge ID="1">
                    > <MenuSystemPage Item RefID="2" X="0.5" Y="0.5" Width="0.5"
                    > Height="0.5">
                    > <Normal EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                    > ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                    > UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                    > <NormalColor1 Red="205" Green="205" Blue="205" Alpha="205" />
                    > <NormalColor2 Red="205" Green="205" Blue="205" Alpha="205" />
                    > </Normal>
                    > <Focused EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                    > ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                    > UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                    > <FocusedColor 1 Red="205" Green="205" Blue="205" Alpha="205" />
                    > <FocusedColor 2 Red="205" Green="205" Blue="205" Alpha="205" />
                    > </Focused>
                    > <Selected EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                    > ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                    > UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                    > <SelectedColo r1 Red="205" Green="205" Blue="205" Alpha="205" />
                    > <SelectedColo r2 Red="205" Green="205" Blue="205" Alpha="205" />
                    > </Selected>
                    > </MenuSystemPageI tem>
                    > </MenuSystemPage>
                    > </Item>
                    > <Item Type="MenuSyste mText">
                    > <MenuSystemObje ct Name="Unnamed Item" />
                    > <MenuSystemIt em ID="2" />
                    > <MenuSystemTe xt LanguageFilenam e="" LanguageID="0"
                    > LastLanguageTex t="HELLO WORLD" />
                    > </Item>
                    > </Item
                    >
                    > =============== =============== ============
                    >
                    > The end tag of the root element has been corrupt and after correct it, I
                    > can load it correctly. I test via C# code. Can you correctly load the
                    > XmlDocument via C# code? Or is there anything else cause the problem?
                    > Please have a try and let me know if you have any futher finding. Thanks.
                    >
                    > Regards,
                    >
                    > Steven Cheng
                    > Microsoft Online Support
                    >
                    > Get Secure! www.microsoft.com/security
                    > (This posting is provided "AS IS", with no warranties, and confers no
                    > rights.)
                    >
                    > Get Preview at ASP.NET whidbey
                    > http://msdn.microsoft.com/asp.net/whidbey/default.aspx
                    >
                    >[/color]


                    Comment

                    • Simon Jefferies

                      #11
                      Re: System error when loading xml document

                      Thanks for your reply,
                      [color=blue]
                      > The end tag of the root element has been corrupt and after correct it, I
                      > can load it correctly. I test via C# code. Can you correctly load the
                      > XmlDocument via C# code? Or is there anything else cause the problem?
                      > Please have a try and let me know if you have any futher finding. Thanks[/color]

                      I have no corruption at my end on the end tag of the root element, I have
                      created a basic XML file containing just the following:

                      <Items></Items>

                      and this failed too.

                      I get a problem with reading the file using VB, C# and Managed C++ code.

                      Regards
                      Simon Jefferies
                      Tools Programmer, Headfirst Productions
                      mailto:simonj@h eadfirst.co.uk
                      www.callofcthulhu.com www.deadlandsgame.com
                      -
                      "Steven Cheng[MSFT]" <v-schang@online.m icrosoft.com> wrote in message
                      news:PuYsqJ3TEH A.2764@cpmsftng xa10.phx.gbl...[color=blue]
                      > Hi Simon,
                      >
                      > Here is the original Xml file you've attached:
                      > =============== ============
                      > <Items>
                      > <Item Type="MenuSyste mPage">
                      > <MenuSystemObje ct Name="Unnamed Page" />
                      > <MenuSystemPa ge ID="1">
                      > <MenuSystemPage Item RefID="2" X="0.5" Y="0.5" Width="0.5"
                      > Height="0.5">
                      > <Normal EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                      > ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                      > UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                      > <NormalColor1 Red="205" Green="205" Blue="205" Alpha="205" />
                      > <NormalColor2 Red="205" Green="205" Blue="205" Alpha="205" />
                      > </Normal>
                      > <Focused EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                      > ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                      > UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                      > <FocusedColor 1 Red="205" Green="205" Blue="205" Alpha="205" />
                      > <FocusedColor 2 Red="205" Green="205" Blue="205" Alpha="205" />
                      > </Focused>
                      > <Selected EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                      > ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                      > UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                      > <SelectedColo r1 Red="205" Green="205" Blue="205" Alpha="205" />
                      > <SelectedColo r2 Red="205" Green="205" Blue="205" Alpha="205" />
                      > </Selected>
                      > </MenuSystemPageI tem>
                      > </MenuSystemPage>
                      > </Item>
                      > <Item Type="MenuSyste mText">
                      > <MenuSystemObje ct Name="Unnamed Item" />
                      > <MenuSystemIt em ID="2" />
                      > <MenuSystemTe xt LanguageFilenam e="" LanguageID="0"
                      > LastLanguageTex t="HELLO WORLD" />
                      > </Item>
                      > </Item
                      >
                      > =============== =============== ============
                      >
                      > The end tag of the root element has been corrupt and after correct it, I
                      > can load it correctly. I test via C# code. Can you correctly load the
                      > XmlDocument via C# code? Or is there anything else cause the problem?
                      > Please have a try and let me know if you have any futher finding. Thanks.
                      >
                      > Regards,
                      >
                      > Steven Cheng
                      > Microsoft Online Support
                      >
                      > Get Secure! www.microsoft.com/security
                      > (This posting is provided "AS IS", with no warranties, and confers no
                      > rights.)
                      >
                      > Get Preview at ASP.NET whidbey
                      > http://msdn.microsoft.com/asp.net/whidbey/default.aspx
                      >
                      >[/color]


                      Comment

                      • Simon Jefferies

                        #12
                        Re: System error when loading xml document

                        Found the problem!

                        It was a bit of a daft one, I was using LoadXml() function instead of
                        Load()!

                        All sorted now! :-)

                        Regards
                        Simon Jefferies
                        Tools Programmer, Headfirst Productions
                        mailto:simonj@h eadfirst.co.uk
                        www.callofcthulhu.com www.deadlandsgame.com
                        -
                        "Simon Jefferies" <simonj@headfir st.co.uk> wrote in message
                        news:%23f0IiK5T EHA.2908@TK2MSF TNGP10.phx.gbl. ..[color=blue]
                        > Thanks for your reply,
                        >[color=green]
                        >> The end tag of the root element has been corrupt and after correct it, I
                        >> can load it correctly. I test via C# code. Can you correctly load the
                        >> XmlDocument via C# code? Or is there anything else cause the problem?
                        >> Please have a try and let me know if you have any futher finding. Thanks[/color]
                        >
                        > I have no corruption at my end on the end tag of the root element, I have
                        > created a basic XML file containing just the following:
                        >
                        > <Items></Items>
                        >
                        > and this failed too.
                        >
                        > I get a problem with reading the file using VB, C# and Managed C++ code.
                        >
                        > Regards
                        > Simon Jefferies
                        > Tools Programmer, Headfirst Productions
                        > mailto:simonj@h eadfirst.co.uk
                        > www.callofcthulhu.com www.deadlandsgame.com
                        > -
                        > "Steven Cheng[MSFT]" <v-schang@online.m icrosoft.com> wrote in message
                        > news:PuYsqJ3TEH A.2764@cpmsftng xa10.phx.gbl...[color=green]
                        >> Hi Simon,
                        >>
                        >> Here is the original Xml file you've attached:
                        >> =============== ============
                        >> <Items>
                        >> <Item Type="MenuSyste mPage">
                        >> <MenuSystemObje ct Name="Unnamed Page" />
                        >> <MenuSystemPa ge ID="1">
                        >> <MenuSystemPage Item RefID="2" X="0.5" Y="0.5" Width="0.5"
                        >> Height="0.5">
                        >> <Normal EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                        >> ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                        >> UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                        >> <NormalColor1 Red="205" Green="205" Blue="205" Alpha="205" />
                        >> <NormalColor2 Red="205" Green="205" Blue="205" Alpha="205" />
                        >> </Normal>
                        >> <Focused EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                        >> ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                        >> UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                        >> <FocusedColor 1 Red="205" Green="205" Blue="205" Alpha="205" />
                        >> <FocusedColor 2 Red="205" Green="205" Blue="205" Alpha="205" />
                        >> </Focused>
                        >> <Selected EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                        >> ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                        >> UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                        >> <SelectedColo r1 Red="205" Green="205" Blue="205" Alpha="205" />
                        >> <SelectedColo r2 Red="205" Green="205" Blue="205" Alpha="205" />
                        >> </Selected>
                        >> </MenuSystemPageI tem>
                        >> </MenuSystemPage>
                        >> </Item>
                        >> <Item Type="MenuSyste mText">
                        >> <MenuSystemObje ct Name="Unnamed Item" />
                        >> <MenuSystemIt em ID="2" />
                        >> <MenuSystemTe xt LanguageFilenam e="" LanguageID="0"
                        >> LastLanguageTex t="HELLO WORLD" />
                        >> </Item>
                        >> </Item
                        >>
                        >> =============== =============== ============
                        >>
                        >> The end tag of the root element has been corrupt and after correct it, I
                        >> can load it correctly. I test via C# code. Can you correctly load the
                        >> XmlDocument via C# code? Or is there anything else cause the problem?
                        >> Please have a try and let me know if you have any futher finding. Thanks.
                        >>
                        >> Regards,
                        >>
                        >> Steven Cheng
                        >> Microsoft Online Support
                        >>
                        >> Get Secure! www.microsoft.com/security
                        >> (This posting is provided "AS IS", with no warranties, and confers no
                        >> rights.)
                        >>
                        >> Get Preview at ASP.NET whidbey
                        >> http://msdn.microsoft.com/asp.net/whidbey/default.aspx
                        >>
                        >>[/color]
                        >
                        >[/color]


                        Comment

                        • Simon Jefferies

                          #13
                          Re: System error when loading xml document

                          Found the problem!

                          It was a bit of a daft one, I was using LoadXml() function instead of
                          Load()!

                          All sorted now! :-)

                          Regards
                          Simon Jefferies
                          Tools Programmer, Headfirst Productions
                          mailto:simonj@h eadfirst.co.uk
                          www.callofcthulhu.com www.deadlandsgame.com
                          -
                          "Simon Jefferies" <simonj@headfir st.co.uk> wrote in message
                          news:%23f0IiK5T EHA.2908@TK2MSF TNGP10.phx.gbl. ..[color=blue]
                          > Thanks for your reply,
                          >[color=green]
                          >> The end tag of the root element has been corrupt and after correct it, I
                          >> can load it correctly. I test via C# code. Can you correctly load the
                          >> XmlDocument via C# code? Or is there anything else cause the problem?
                          >> Please have a try and let me know if you have any futher finding. Thanks[/color]
                          >
                          > I have no corruption at my end on the end tag of the root element, I have
                          > created a basic XML file containing just the following:
                          >
                          > <Items></Items>
                          >
                          > and this failed too.
                          >
                          > I get a problem with reading the file using VB, C# and Managed C++ code.
                          >
                          > Regards
                          > Simon Jefferies
                          > Tools Programmer, Headfirst Productions
                          > mailto:simonj@h eadfirst.co.uk
                          > www.callofcthulhu.com www.deadlandsgame.com
                          > -
                          > "Steven Cheng[MSFT]" <v-schang@online.m icrosoft.com> wrote in message
                          > news:PuYsqJ3TEH A.2764@cpmsftng xa10.phx.gbl...[color=green]
                          >> Hi Simon,
                          >>
                          >> Here is the original Xml file you've attached:
                          >> =============== ============
                          >> <Items>
                          >> <Item Type="MenuSyste mPage">
                          >> <MenuSystemObje ct Name="Unnamed Page" />
                          >> <MenuSystemPa ge ID="1">
                          >> <MenuSystemPage Item RefID="2" X="0.5" Y="0.5" Width="0.5"
                          >> Height="0.5">
                          >> <Normal EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                          >> ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                          >> UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                          >> <NormalColor1 Red="205" Green="205" Blue="205" Alpha="205" />
                          >> <NormalColor2 Red="205" Green="205" Blue="205" Alpha="205" />
                          >> </Normal>
                          >> <Focused EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                          >> ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                          >> UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                          >> <FocusedColor 1 Red="205" Green="205" Blue="205" Alpha="205" />
                          >> <FocusedColor 2 Red="205" Green="205" Blue="205" Alpha="205" />
                          >> </Focused>
                          >> <Selected EaseInTime="1" TimesPerSecond= "1" Scale1="1" Scale2="1"
                          >> ColorPulsate="0 " SizePulsate="0" UVPulsate="0" PositionThrob=" 0"
                          >> UVThrob="0" ColourAnimate=" 0" PositionAnimate ="0" UVAnimate="0">
                          >> <SelectedColo r1 Red="205" Green="205" Blue="205" Alpha="205" />
                          >> <SelectedColo r2 Red="205" Green="205" Blue="205" Alpha="205" />
                          >> </Selected>
                          >> </MenuSystemPageI tem>
                          >> </MenuSystemPage>
                          >> </Item>
                          >> <Item Type="MenuSyste mText">
                          >> <MenuSystemObje ct Name="Unnamed Item" />
                          >> <MenuSystemIt em ID="2" />
                          >> <MenuSystemTe xt LanguageFilenam e="" LanguageID="0"
                          >> LastLanguageTex t="HELLO WORLD" />
                          >> </Item>
                          >> </Item
                          >>
                          >> =============== =============== ============
                          >>
                          >> The end tag of the root element has been corrupt and after correct it, I
                          >> can load it correctly. I test via C# code. Can you correctly load the
                          >> XmlDocument via C# code? Or is there anything else cause the problem?
                          >> Please have a try and let me know if you have any futher finding. Thanks.
                          >>
                          >> Regards,
                          >>
                          >> Steven Cheng
                          >> Microsoft Online Support
                          >>
                          >> Get Secure! www.microsoft.com/security
                          >> (This posting is provided "AS IS", with no warranties, and confers no
                          >> rights.)
                          >>
                          >> Get Preview at ASP.NET whidbey
                          >> http://msdn.microsoft.com/asp.net/whidbey/default.aspx
                          >>
                          >>[/color]
                          >
                          >[/color]


                          Comment

                          Working...