Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   XML (https://www.delphipraxis.net/46-xml/)
-   -   Delphi XML Codes verschmelzen...Wie? (https://www.delphipraxis.net/140822-xml-codes-verschmelzen-wie.html)

torud 26. Sep 2009 18:51


XML Codes verschmelzen...Wie?
 
Hallo,

ich habe die Suchfunktion betätigt, aber leider keine Hilfe gefunden.

Folgenden Code habe ich

Delphi-Quellcode:
<?xml version="1.0" encoding="UTF-8"?>
<GraphicsMessage>
  <Adress>
    <Machine_Ids>1</Machine_Ids>
  </Adress>
  <Command>
    <Command_type>LoadLayer</Command_type>
    <Command_layer>1</Command_layer>
    <Command_swf>compose.swf</Command_swf>
  </Command>
  <Command>
    <Command_type>FadeInLayer</Command_type>
    <Command_layer>1</Command_layer>
    <Command_frames>15</Command_frames>
  </Command>
  <TextData/>
</GraphicsMessage>
Der folgende Code soll in TextData als Child eingeführt werden. Ich habs mit
Delphi-Quellcode:
cmdNode := xmlDoc.DocumentElement.AddChild(compose);
versucht, aber erhalte immer eine Exception. Wie kann mans machen?
Delphi-Quellcode:
<Compose>
   <object>
      <typ>TextField</typ>
      <name>nat1</name>
      <caption>GER</caption>
      <TextTyp>dynamic</TextTyp>
      <font>Verdana</font>
      <height>18</height>
      <width>150</width>
      <xpos>186</xpos>
      <ypos>472</ypos>
      <xscale>0.52</xscale>
      <yscale>0.52</yscale>
      <alpha>56</alpha>
      <color>#000000</color>
   </object>
   <object>
      <typ>TextField</typ>
      <name>nat2</name>
      <caption>FRA</caption>
      <TextTyp>dynamic</TextTyp>
      <font>Arial</font>
      <height>14</height>
      <width>150</width>
      <xpos>286</xpos>
      <ypos>472</ypos>
      <xscale>0.52</xscale>
      <yscale>0.52</yscale>
      <alpha>85</alpha>
      <color>#ffffff</color>
   </object>
</Compose>

DeddyH 26. Sep 2009 19:09

Re: XML Codes verschmelzen...Wie?
 
Ich habe den Thread nicht verfolgt, aber in den letzten Tagen war doch ein ähnliches Thema: http://www.delphipraxis.net/internal...t.php?t=165362

torud 26. Sep 2009 19:17

Re: XML Codes verschmelzen...Wie?
 
Naja, wenn ich ehrlich bin, erschliesst sich mir der Zusammen hang nicht ganz. Ich habe beide XML-Code-Abschnitte fertig vorliegen, finde aber keine Möglichkeit sie sauber zusammen zu fügen.

Ich kenne nur den Code zum Neuanlegen von Nodes, aber nicht zum Hinzufügen fertiger Codeabschnitte.


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:26 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-2025 by Thomas Breitkreuz