XML Dom export problem with long text

dgroeserdgroeser Member Posts: 39
Hello

my problem is, that i must export text bigger than 1024 in one tag, now i tasted follow code

// tag
XMLNewElement := XMLDoc.createElement('tagname');
XMLNewElement.text := 'wert';
XMLCurrentElement.appendChild(XMLNewElement);
XMLNewElement.text := 'wert2';
XMLCurrentElement.appendChild(XMLNewElement);

the problem is, that replace the wert with wert2 and don´t append the text??

There is a another problem im xml file write down utf-8, when i open this file, thats all in ansi??
XMLNewProcessInst := XMLDoc.createProcessingInstruction('xml','version="1.0" encoding="UTF-8"');
XMLDoc.appendChild(XMLNewProcessInst);

Comments

  • jlandeenjlandeen Member Posts: 524
    Yes appendChilid is going to append the element as a whole. You should look at the appendData function - this should simply add more text to what is already contained within the node/element.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.