<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[root Element XML]]></title><description><![CDATA[<p>Hi zusammen, ich habe ein kleines Problem mit tinyXml.<br />
Ich habe mir 3 Elemente gebastelt, welchen ich im weiteren Programmverlauf noch weitere Hinzufüge. Das klappt auch alles Wunderbar.<br />
Jetzt würde ich nur gerne ein root Element drumpacken und habe das versucht wie folgt zu lösen:</p>
<pre><code class="language-cpp">TiXmlDocument doc;
    TiXmlDeclaration * decl = new TiXmlDeclaration( &quot;1.0&quot;, &quot;&quot;, &quot;&quot; );
    doc.LinkEndChild( decl );

    TiXmlElement * root = new TiXmlElement(&quot;Wago&quot;);
    doc.LinkEndChild( root );

    TiXmlElement * settings = new TiXmlElement(&quot;Settings&quot;);
    doc.LinkEndChild( settings );
    root-&gt;LinkEndChild( settings );

    TiXmlElement * energy = new TiXmlElement(&quot;EnergyConsumption&quot;);
    doc.LinkEndChild( energy );
    root-&gt;LinkEndChild( energy );

    TiXmlElement * data = new TiXmlElement( &quot;Measurement&quot; );
    doc.LinkEndChild( data );
    root-&gt;LinkEndChild( data );
</code></pre>
<p>sobald ich die zeilen in denen root vorkommt jedoch drin habe bekomme während der Laufzeit folgenden Fehler mit dem ich nichts anfangen kann. Evtl kann mir einer von euch sagen woran es liegt.</p>
<pre><code class="language-cpp">TiXmlNode* TiXmlNode::LinkEndChild(TiXmlNode*): Assertion `node-&gt;parent == 0 || node-&gt;parent == this' failed.
</code></pre>
<p>Danke schonmal für euere Gedanken.</p>
<p>Gruß oNes</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/272041/root-element-xml</link><generator>RSS for Node</generator><lastBuildDate>Sat, 29 Aug 2026 02:22:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/272041.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 09 Aug 2010 10:16:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to root Element XML on Mon, 09 Aug 2010 10:16:42 GMT]]></title><description><![CDATA[<p>Hi zusammen, ich habe ein kleines Problem mit tinyXml.<br />
Ich habe mir 3 Elemente gebastelt, welchen ich im weiteren Programmverlauf noch weitere Hinzufüge. Das klappt auch alles Wunderbar.<br />
Jetzt würde ich nur gerne ein root Element drumpacken und habe das versucht wie folgt zu lösen:</p>
<pre><code class="language-cpp">TiXmlDocument doc;
    TiXmlDeclaration * decl = new TiXmlDeclaration( &quot;1.0&quot;, &quot;&quot;, &quot;&quot; );
    doc.LinkEndChild( decl );

    TiXmlElement * root = new TiXmlElement(&quot;Wago&quot;);
    doc.LinkEndChild( root );

    TiXmlElement * settings = new TiXmlElement(&quot;Settings&quot;);
    doc.LinkEndChild( settings );
    root-&gt;LinkEndChild( settings );

    TiXmlElement * energy = new TiXmlElement(&quot;EnergyConsumption&quot;);
    doc.LinkEndChild( energy );
    root-&gt;LinkEndChild( energy );

    TiXmlElement * data = new TiXmlElement( &quot;Measurement&quot; );
    doc.LinkEndChild( data );
    root-&gt;LinkEndChild( data );
</code></pre>
<p>sobald ich die zeilen in denen root vorkommt jedoch drin habe bekomme während der Laufzeit folgenden Fehler mit dem ich nichts anfangen kann. Evtl kann mir einer von euch sagen woran es liegt.</p>
<pre><code class="language-cpp">TiXmlNode* TiXmlNode::LinkEndChild(TiXmlNode*): Assertion `node-&gt;parent == 0 || node-&gt;parent == this' failed.
</code></pre>
<p>Danke schonmal für euere Gedanken.</p>
<p>Gruß oNes</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1937882</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1937882</guid><dc:creator><![CDATA[oNes]]></dc:creator><pubDate>Mon, 09 Aug 2010 10:16:42 GMT</pubDate></item><item><title><![CDATA[Reply to root Element XML on Mon, 09 Aug 2010 10:58:09 GMT]]></title><description><![CDATA[<p>habs. So gehts:</p>
<pre><code class="language-cpp">TiXmlDocument doc;
    TiXmlDeclaration * decl = new TiXmlDeclaration( &quot;1.0&quot;, &quot;&quot;, &quot;&quot; );
    doc.LinkEndChild( decl );

    TiXmlElement * root = new TiXmlElement(&quot;wago&quot;);
    doc.LinkEndChild( root );

    TiXmlElement * settings = new TiXmlElement(&quot;settings&quot;);
    root-&gt;LinkEndChild( settings );

    TiXmlElement * energy = new TiXmlElement(&quot;energyconsumption&quot;);
    root-&gt;LinkEndChild( energy );

    TiXmlElement * data = new TiXmlElement( &quot;measurement&quot; );
    root-&gt;LinkEndChild( data );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1937895</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1937895</guid><dc:creator><![CDATA[oNes]]></dc:creator><pubDate>Mon, 09 Aug 2010 10:58:09 GMT</pubDate></item></channel></rss>