Einzelnen Beitrag anzeigen

value is NULL

Registriert seit: 10. Sep 2010
249 Beiträge
 
#1

Xmlnode.childnodes.Add Howto

  Alt 19. Sep 2011, 10:11
Hi Leute

Will mir gerade ein XML Tool basteln welches folgendes macht:

Ich habe ein XML welches wie folgt aussieht (zumindest ein Teil davon):

Code:
<module>
 <module servername="WIN2K3-V3-3" type="MGR" moduleindex="0" />
 <module servername="WIN2K3-V3-3" type="ACCM" moduleindex="101" />
 <module subtype="virtual" servername="WIN2K3-V3-3" type="hw" moduleindex="102" />
 <module subtype="virtual" servername="WIN2K3-V3-3" type="sw" moduleindex="104" />
 <module subtype="virtual" servername="WIN2K3-V3-3" type="Web" moduleindex="110" />
 <module subtype="physical" servername="WIN2K3-V3-3" type="system" moduleindex="200" />
 <module subtype="virtual" servername="WIN2K3-V3-3" type="system" moduleindex="201" />
 <module subtype="physical" servername="WIN2K3-V3-3" type="system" moduleindex="444" />
 <module subtype="virtual" servername="WIN2K3-V3-3" type="system" moduleindex="608" />
</module>
ich möchte mir jetzt ein kleines xmltool schreiben, welches mir per commandline module hinzufügt bzw. wieder löscht. Ich benutze dafür "xmlintf" und "xmldoc"

ich lade mir das xml
xml := LoadXMLDocument('C:\test\app\config\cfg.xml'); und will es jetzt ändern. Ich haber aber bisher nur mit
myNode.ChildNodes.FindNode('post').Text := '1'; gearbeitet. Wie kann ich das am schönsten realisieren?! Bin XML technisch nicht so bewandert und schon froh das ich mir überhaupt Werte auslesen kann

LG und Danke schon mal

Geändert von value is NULL (19. Sep 2011 um 13:58 Uhr)
  Mit Zitat antworten Zitat