Menu

Write / adding new nodes

2004-03-12
2004-03-27
  • steven smethurst

    Hello
    I found your parser to be perfect for my project reading setting out of a large XML file

    Now I need to add new nodes to my settings file, but Im not sure how to do this
    Before example
    ============
    <node>
        <settings>
            <database>
                <one />
                <two />
                <three />
            </database>
        </settings>
    </node>
    I want to add anther database node to the structure

    After example

    <node>
        <settings>
            <database>
                <one />
                <two />
                <three />
            </database>
            <database>
                <one />
                <two />
                <three />
            </database>
        </settings>
    </node>

    is there a example of this somewhere ?

    Thank you for your time...

     
    • Lee Thomason

      Lee Thomason - 2004-03-15

      xmltest.cpp demonstrates almost exactly the case you are interested in.

      That said, I get this question often, enough that I wonder if something may need to be adjusted. Is node creation not well documented? Not called out specifically enough? What is missing that would have made it easier to find the answer?

      Input much appreciated,
      lee

       
    • steven smethurst

      Well I feel foolish I didnt even look/run that file.

      Well the first place i looked for an example was the Online Documentation
      http://www.grinninglizard.com/tinyxmldocs/index.html

      it was easy enough to setup my function once i found the examples.

      Maybe put an example page in the online documentation, one example for each function, so people dont get overwhelmed.

      Or even post xmltest.cpp file in the online documentation
      Or rename xmltest.cpp to xmlexamples.cpp

      Sorry it took me so long to respond
      Thank you very much for this fantastic XML parser.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.