AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

bei XML Add - alles in einer "wurscht"

Ein Thema von value is NULL · begonnen am 28. Sep 2011 · letzter Beitrag vom 29. Sep 2011
Antwort Antwort
value is NULL

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

bei XML Add - alles in einer "wurscht"

  Alt 28. Sep 2011, 09:10
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:
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');
das ganze sieht dann abe rso aus:

Code:
<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>
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?

LG und Danke!
  Mit Zitat antworten Zitat
FredlFesl

Registriert seit: 19. Apr 2011
293 Beiträge
 
Delphi 2009 Enterprise
 
#2

AW: bei XML Add - alles in einer "wurscht"

  Alt 29. Sep 2011, 08:02
Na ja, XML ist an sich unformatiert.
Wenn Du es hübsch haben willst, musst Du es hübsch machen, also formatieren.
GIDF
Das Bild hängt schief.
  Mit Zitat antworten Zitat
Benutzerbild von MarcoWarm
MarcoWarm

Registriert seit: 10. Sep 2003
Ort: Großhennersdorf
532 Beiträge
 
Delphi 10.1 Berlin Professional
 
#3

AW: bei XML Add - alles in einer "wurscht"

  Alt 29. Sep 2011, 08:16
Hallo,

das geht zum Beispiel so: http://www.delphipraxis.net/933572-post4.html
Marco Warm
TUO
TheUnknownOnes.net
  Mit Zitat antworten Zitat
value is NULL

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

AW: bei XML Add - alles in einer "wurscht"

  Alt 29. Sep 2011, 10:31
aber ich benutze ja kein ixmldomdocument ...
  Mit Zitat antworten Zitat
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:04 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz