Page 1 of 1

Adding XML Child with ID

Posted: Sat Jun 20, 2020 11:52 pm
by jabramson623
Having trouble wrapping my head around this one. If I manually add this child to the XML document, I can read and write, but I'm trying to figure out how to add the child via LC.

Code: Select all

<Preferences>
  <Graphics>
     <Meeting IDnum="1">
        <title>Meeting #1</title>
        <time>3:00pm</time>
    </Meeting>
     <Meeting IDnum="2">
        <title>Meeting #2</title>
        <time>4:00pm</time>
    </Meeting>
  </Graphics>
</Preferences>
How would I add/insert the meeting into IDnum #3, or add to the end at the next valid number?

Re: Adding XML Child with ID

Posted: Sun Jun 21, 2020 4:50 am
by kdjanz
Look up the XML library in the associations section in the left pane of the dictionary window. If you click on XML Library, it will filter all the XML properties and commands for you so that you can read about the command revXMLAddNode which I think is what you need.

I'm just a beginner too and have never used XML, but I hope this points you in the right direction.

kelly