Forum: XML
Delphi
by padavan,
24. Sep 2009
i2 gar nicht -> stimmt, ich bin ja auch blöd.
Ansonsten bin ich offiziell begeistert.
Sieht echt gut aus.
Ich danke Dir für Deine Geduld!!!!
Viele Grüße
Padavan
Forum: XML
Delphi
by padavan,
24. Sep 2009
while Assigned(NodeAnother) do
begin
NodeNext := NodeAnother.NextSibling;
i := 0;
while (i < NodeBase.childNodes.length)
and (not Assigned(NodeBase.childNodes.firstChild)
or not Assigned(NodeAnother.firstChild)
or (NodeBase.childNodes.firstChild)
<> NodeAnother.firstChild.text)) do //<<<< operator not applicable to this operand type
Inc(i);
Forum: XML
Delphi
by padavan,
24. Sep 2009
stimmt.
if NodeAnother.childNodes.hasChildNodes = true then
so geht´s aber leider schon mal nicht
Forum: XML
Delphi
by padavan,
24. Sep 2009
Ha!
So geht´s
while Assigned(NodeAnother) do
begin
NodeNext := NodeAnother.NextSibling;
i := 0;
while (i < NodeBase.childNodes.length)
Forum: XML
Delphi
by padavan,
24. Sep 2009
Das bringt leider immernoch -> siehe Anhang
wenn ich es so probiere
while NodeBase.childNodes.childNodes.length > 0 do
NodeBase.childNodes.removeChild(NodeBase.childNodes.firstChild);
klappt das zwar, aber im nächsten Durchlauf bei
Forum: XML
Delphi
by padavan,
24. Sep 2009
wenn, dann so
for i2 := 0 to NodeAnother.childNodes.length - 1 do
NodeBase.childNodes.appendChild(NodeAnother.childNodes); //0
Bringt aber beim letzten Durchlauf immer: "Kein untergeordneter Knoten"
Ich brech noch ab
Forum: XML
Delphi
by padavan,
23. Sep 2009
ach das mit I2 wollte ich auch gerade schreiben.
Aber, den elsezweig ausklammern ist nicht richtig, genau der macht das richtige. Du hast schon recht, es fehlt nur noch das löschen der vorhandenen alten childnodes.
Das Ergebnis Deiner korrigierten Routine ist jetzt
<root>
<nodes>
<node>
Forum: XML
Delphi
by padavan,
23. Sep 2009
Vielen Dank himitsu,
das Ergebnis ist nah dran.
Da scheint noch ein kleiner Schleifenfehler inne zu wohnen.
Das kommentierte Ergebnis müsste lauten:
<root>
<nodes>