Probel reading xml file in module

Last post 09-19-2004 1:42 PM by DBuckner. 1 replies.

Sort Posts:

  • Probel reading xml file in module

    09-19-2004, 6:56 AM
    • Participant
      770 point Participant
    • jonhsv
    • Member since 02-11-2003, 11:18 AM
    • Posts 156
    Hello everyone


    I´m creating module in DNN 2.1.2 where I need to read some xml file which is located under my Moduel folder under Desktop Modules

    But I alwasy receive this error

    the data at the root level is invalid, Line 1, position 1


    my xml file is well formed

    <?xml version="1.0" encoding="utf-8"?>
    <Panel>
    <Group xmlns="">
    <Item ID="Item1" Caption="Key Topics">
    <Group InitiallyOpen="True">
    <Item ID="Item4" Caption="Architecture" URL="GroupDrag.aspx" />
    <Item ID="Item5" Caption="XML Web Services" Enabled="True" Visible="True" URL="GroupDrag.aspx" />
    <Item ID="Item6" Caption="Visual Studio .NET" URL="GroupDrag.aspx" />
    <Item ID="Item7" Caption="Windows" URL="GroupDrag.aspx" />
    </Group>
    </Item>
    <Item ID="Item2" Caption="Community">
    <Group InitiallyOpen="True" GroupHeight="145">
    <Item ID="Item8" Caption="Chats" ItemCssClass="GroupDragItemTitle" ItemWidth="140" ItemOverCssClass="GroupDragItemTitle" LeftIcon="Item_BlankLeftIcon.gif" LeftIconOver="Item_BlankLeftIcon.gif" />
    <Item ID="Item9" Caption="December 3: Windows Installer" URL="GroupDrag.aspx" />
    <Item ID="Item10" Caption="All Chats" URL="GroupDrag.aspx" />
    <Item ID="Item11" Caption="Newsgroups" ItemCssClass="GroupDragItemTitle" ItemWidth="140" ItemOverCssClass="GroupDragItemTitle" LeftIcon="Item_BlankLeftIcon.gif" LeftIconOver="Item_BlankLeftIcon.gif" />
    <Item ID="Item12" Caption=".NET Framework" URL="GroupDrag.aspx" />
    <Item ID="Item13" Caption="All Newsgroups" URL="GroupDrag.aspx" />
    </Group>
    </Item>
    <Item ID="Item3" Caption="Downloads">
    <Group InitiallyOpen="True" GroupHeight="90">
    <Item ID="Item14" Caption=".NET Framework" URL="GroupDrag.aspx" />
    <Item ID="Item15" Caption="DirectX SDK" URL="GroupDrag.aspx" />
    <Item ID="Item16" Caption="Microsoft XML Core Services 4.0 SP1" URL="GroupDrag.aspx" />
    </Group>
    </Item>
    </Group>
    </Panel>


    I tried to create simple Console program and tried to load the xml file from it as following


    XmlDocument doc = new XmlDocument();

    try
    {
    doc.LoadXml(@"c:\Config.xml");
    }
    catch(XmlException e)
    {
    e.Message.ToString();
    }


    But I always receive the same error,

    Could this been some security problem due to the service pack 2 for XP ?

    Regards


    Jón Sveinsson

  • Re: Probel reading xml file in module

    09-19-2004, 1:41 PM
    • Contributor
      4,760 point Contributor
    • DBuckner
    • Member since 01-23-2003, 6:10 PM
    • Illinois
    • Posts 952
    can you post the error you get? That will help someone to be able to look at it without firing up VS.net

    Dave
Page 1 of 1 (2 items)