Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to update xml file using VB.NET??

    Hi guys ..

    I'm just the beginner, now i've got some problem in my task. I'm also using the newscroller Javascript as same as the above

    I want to update my XML file (News.xml) using VB.NET code behind. I have managed to create XML like this :-



    <NewDataSet>
    <Item>
    <Text> testing one </Text>
    </Item>
    </NewDataSet>


    .. and from this XML file, I want to load it into the newscroller Javascript.
    The problem is, the Javascript code just can load XML data field like below only --->



    <xml id="xmlNews">
    <Items>
    <Item>
    <Text> testing two </Text>
    </Item>
    <Items>
    </xml>



    and if i update the XML file, it will store 'outside' of the <xml id="xmlNews'>.



    <NewDataSet>

    <xml id="xmlNews">
    <Items>
    <Item>
    <Text> testing two </Text>
    </Item>
    <Items>
    </xml>

    <Item>
    <Text> testing one </Text>
    </Item>
    </NewDataSet>


    ..as the result, the newscroller Javascript will not load the updated values (testing one) above.

    can somebody help me please ..?
    if you guys do not follow the problems, later i will post the VB.Net Code creating the dataset of the XML..

    thank you .

  • #2
    New Coder
    Join Date
    Mar 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    XML Tutorial

    Check with the follwoing link

    http://vb.net-informations.com/xml/v...l-tutorial.htm

    robert.

  • #3
    Regular Coder
    Join Date
    May 2007
    Location
    UK
    Posts
    180
    Thanks
    0
    Thanked 18 Times in 18 Posts
    The simple answer is: Don't write
    Code:
    <NewDataSet>
      <Item>
        <Text> testing one </Text>
      </Item>
    </NewDataSet>
    to News.xml. Write this instead:
    Code:
    <xml id="xmlNews">
      <Items>
        <Item>
          <Text> testing two </Text>
        </Item>
      <Items>
    </xml>
    If you post your code I could show you what needs to be changed, if necessary.

    Robert, I looked through the tutorials behind the link you supplied. The website had some useful VB.NET/XML stuff but I didn't find anything close enough to be the answer to the original question asked.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •