Need XMLDOM HELP

tiagofrancistiagofrancis Member Posts: 48
Hi Folks,

I need your help in a very simple task, i think.

I need to create a xml structure like this one:

<?xml version="1.0" encoding="ISO-8859-1" ?>
- <note>
<to>Text</to>
<from>Text</from>
<heading>Text</heading>
<body>Text</body>
</note>

I want to use XMLDom Document Automation, but i don't know how. Can anyone please help?

Thank you loads,

Tiago

Answers

  • tiagofrancistiagofrancis Member Posts: 48
    I've managed to do this by my self. Thanks anyway.

    The code for just building one node with text in it:

    CREATE(vDoc);
    vNode := vDoc.createNode(1,'Note','');
    vDoc.appendChild(vNode);
    vText := vDoc.createTextNode('String');
    vNode.appendChild(vText);
    vDoc.save('C:\Temp\Text.xml');

    Keep up!
Sign In or Register to comment.