![]() |
bei XML Add - alles in einer "wurscht"
Hi Leute
habe warscheinlich ein simples Problem, weiß aber gerade nicht wie ichs aus der Welt schaffen kann. Ich habe in meinen Programm eine ADDtoXML Funktion in der ich eigentlich folgendes mache:
Delphi-Quellcode:
das ganze sieht dann abe rso aus:
xmlnode := xml.ChildNodes.FindNode('voxctmodule_list');
newnode := XMLNode.AddChild('voxctmodule'); newnode.Attributes['servername'] := tools.GetMachineName; newnode.Attributes['subtype'] := opt.getoptasstr('modulename'); newnode.Attributes['type'] := opt.getoptasstr('moduletype'); newnode.Attributes['moduleindex'] := opt.getoptasstr('moduleid'); newnode.Attributes['modulesubtype'] := opt.getoptasstr('modulesubtype'); xml.SaveToFile('C:\config.xml');
Code:
Ich habe hier praktisch 2 neue module eingetragen (subtype Archiv) dh. 2 mal meine Funktion aufgerufen. Wie kann ich das den machen das ich das so wie die oberen Module aufgereiht habe?
<module_list>
<module servername="WIN2K3-V3-3" type="msgmgr" moduleindex="0"/> <module servername="WIN2K3-V3-3" type="Mgr" moduleindex="101"/> <module subtype="Generic" servername="WIN2K3-V3-3" type="Rps" moduleindex="102"/> <module subtype="V3" servername="WIN2K3-V3-3" type="ACC" moduleindex="104"/> <module subtype="V3" servername="WIN2K3-V3-3" type="WebServer" moduleindex="110"/> <module subtype="ync" servername="WIN2K3-V3-3" type="system" moduleindex="200"/> <module subtype="stat" servername="WIN2K3-V3-3" type="system" moduleindex="201"/> <module subtype="State" servername="WIN2K3-V3-3" type="system" moduleindex="444"/> <module subtype="Update" servername="WIN2K3-V3-3" type="system" moduleindex="608"/> <module servername="WKS-IT-03" subtype="Archiv" type="System" moduleindex="701" modulesubtype=""/><module servername="WKS-IT-03" subtype="Archiv2" type="System" moduleindex="701" modulesubtype=""/></module_list> LG und Danke! |
AW: bei XML Add - alles in einer "wurscht"
Na ja, XML ist an sich unformatiert.
Wenn Du es hübsch haben willst, musst Du es hübsch machen, also formatieren. GIDF |
AW: bei XML Add - alles in einer "wurscht"
|
AW: bei XML Add - alles in einer "wurscht"
aber ich benutze ja kein ixmldomdocument ... :(
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:25 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz