Einzelnen Beitrag anzeigen

schwa226

Registriert seit: 4. Apr 2008
400 Beiträge
 
#3

Re: createNode, IXMLDOMDocument - Node hinzufügen

  Alt 5. Jul 2009, 20:11
Trotzdem Danke!

Habe es jetzt so hinbekommen :

Delphi-Quellcode:
  xHTPCNoteNode := doc.selectSingleNode('//group[@Name="Programs"]');

  xHTPCNoteNode := xHTPCNoteNode.appendChild(doc.createElement('program'));

  xHTPCNoteNode.attributes.setNamedItem(doc.createAttribute('location'));
  xHTPCNoteNode.attributes.getNamedItem('location').nodeValue := AppPath;

  xHTPCNoteNode := xHTPCNoteNode.appendChild(doc.createElement('StartDelay'));
  xHTPCNoteNode.text := IntToStr(Delay);
Result:
Code:
      <program location="c:\windows\notepad.exe">
         <StartDelay>5</StartDelay>
      </program>
  Mit Zitat antworten Zitat