<?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[XML-Element wird nicht gefunden]]></title><description><![CDATA[<p>ich versuche anhand des beispiels in der FAQ nun folgende Datei einzulesen Doch leider findet der meinen Element Size nicht.</p>
<p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;kb:Config xmlns:kb=&quot;<a href="http://example.org/KB" rel="nofollow">http://example.org/KB</a>&quot;&gt;<br />
&lt;Size&gt;100&lt;/Size&gt;<br />
&lt;/kb:Config&gt;</p>
<pre><code class="language-cpp">_di_IXMLNodeList NodeList;
   _di_IXMLNode Node;

   NodeList = pXMLDoc-&gt;DocumentElement-&gt;ChildNodes;
   if (NodeList)
   {
      Node = NodeList-&gt;FindNode(L&quot;Size&quot;);
      if (Node)
      {

      }
   }
</code></pre>
<p>als Node ist immer Null. Wroan könnte das liegen?</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/170498/xml-element-wird-nicht-gefunden</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 22:23:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/170498.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 Jan 2007 12:10:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to XML-Element wird nicht gefunden on Fri, 25 Oct 2013 09:33:55 GMT]]></title><description><![CDATA[<p>ich versuche anhand des beispiels in der FAQ nun folgende Datei einzulesen Doch leider findet der meinen Element Size nicht.</p>
<p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;kb:Config xmlns:kb=&quot;<a href="http://example.org/KB" rel="nofollow">http://example.org/KB</a>&quot;&gt;<br />
&lt;Size&gt;100&lt;/Size&gt;<br />
&lt;/kb:Config&gt;</p>
<pre><code class="language-cpp">_di_IXMLNodeList NodeList;
   _di_IXMLNode Node;

   NodeList = pXMLDoc-&gt;DocumentElement-&gt;ChildNodes;
   if (NodeList)
   {
      Node = NodeList-&gt;FindNode(L&quot;Size&quot;);
      if (Node)
      {

      }
   }
</code></pre>
<p>als Node ist immer Null. Wroan könnte das liegen?</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210693</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210693</guid><dc:creator><![CDATA[maikhaenig]]></dc:creator><pubDate>Fri, 25 Oct 2013 09:33:55 GMT</pubDate></item><item><title><![CDATA[Reply to XML-Element wird nicht gefunden on Tue, 16 Jan 2007 14:42:34 GMT]]></title><description><![CDATA[<p>leider ist nicht so richtig ersichtlich ob &quot;Size&quot; eine DocumentElement-&gt;ChildNodes Node ist, da der hier gezeigte xml text nicht korrekt ist. Sollte es so sein, würde ich es so oder so ähnlich machen.</p>
<p>nimm diese hier zum testen</p>
<p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;DocumentElement&gt;<br />
&lt;Size&gt;100&lt;/Size&gt;<br />
&lt;/DocumentElement&gt;</p>
<p>Außerdem wird eine exeption ausgelößt, wenn Du das xml document auf active setzt und nicht beim laden der Datei.</p>
<pre><code class="language-cpp">_di_IXMLNodeList NodeList = pXMLDoc-&gt;DocumentElement-&gt;ChildNodes; 

   if (NodeList) 
   { 
      if (NodeList-&gt;IndexOf((String)&quot;Size&quot;) &gt; -1) 
      { 
        _di_IXMLNode Node = NodeList-&gt;Nodes[(String)&quot;Size&quot;]; 
        AnsiString test = Node-&gt;Text;        
      } 
   }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1210757</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210757</guid><dc:creator><![CDATA[OldMan00]]></dc:creator><pubDate>Tue, 16 Jan 2007 14:42:34 GMT</pubDate></item><item><title><![CDATA[Reply to XML-Element wird nicht gefunden on Tue, 16 Jan 2007 15:46:07 GMT]]></title><description><![CDATA[<p>warum ist meine xml Datei nicht koorekt. Ohne den Namensraum hat der MSValidierer die xml datei nicht correct zu meiner Grammatik erkannt.</p>
<p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;xsd:schema xmlns:xsd=&quot;<a href="http://www.w3.org/2001/XMLSchema" rel="nofollow">http://www.w3.org/2001/XMLSchema</a>&quot;<br />
xmlns:kb=&quot;<a href="http://example.org/KB" rel="nofollow">http://example.org/KB</a>&quot;<br />
targetNamespace=&quot;<a href="http://example.org/KB" rel="nofollow">http://example.org/KB</a>&quot;&gt;<br />
&lt;xsd:element name=&quot;Config&quot; type=&quot;kb:Config&quot; /&gt;<br />
&lt;xsd:simpleType name=&quot;TWord&quot;&gt;<br />
&lt;xsd:restriction base=&quot;xsd:integer&quot;&gt;<br />
&lt;xsd:minInclusive value=&quot;0&quot; /&gt;<br />
&lt;xsd:maxInclusive value=&quot;65535&quot; /&gt;<br />
&lt;/xsd:restriction&gt;<br />
&lt;/xsd:simpleType&gt;<br />
&lt;xsd:complexType name=&quot;Config&quot;&gt;<br />
<a href="xsd:sequence" rel="nofollow">xsd:sequence</a><br />
&lt;xsd:element name=&quot;Size&quot; type=&quot;kb:TWord&quot; /&gt;<br />
&lt;/xsd:sequence&gt;<br />
&lt;/xsd:complexType&gt;<br />
&lt;/xsd:schema&gt;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210841</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210841</guid><dc:creator><![CDATA[maikhaenig]]></dc:creator><pubDate>Tue, 16 Jan 2007 15:46:07 GMT</pubDate></item><item><title><![CDATA[Reply to XML-Element wird nicht gefunden on Tue, 16 Jan 2007 16:46:28 GMT]]></title><description><![CDATA[<p>maikhaenig schrieb:</p>
<blockquote>
<p>warum ist meine xml Datei nicht koorekt.</p>
</blockquote>
<p>was soll ich da sagen ? weil der gezeigte Ausschnitt kein korrektes xml-dokument ist.</p>
<p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;kb:Config xmlns:kb=&quot;<a href="http://example.org/KB" rel="nofollow">http://example.org/KB</a>&quot;&gt;<br />
&lt;Size&gt;100&lt;/Size&gt;<br />
&lt;/kb:Config&gt;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210901</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210901</guid><dc:creator><![CDATA[OldMan00]]></dc:creator><pubDate>Tue, 16 Jan 2007 16:46:28 GMT</pubDate></item><item><title><![CDATA[Reply to XML-Element wird nicht gefunden on Fri, 25 Oct 2013 09:34:20 GMT]]></title><description><![CDATA[<p>also ich habe jetzt folgende xml datei:</p>
<p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</p>
<p>&lt;Config<br />
xsi:schemaLocation=&quot;<a href="http://www.test.de" rel="nofollow">http://www.test.de</a> ReaderConfig1.xsd&quot;<br />
xmlns=&quot;<a href="http://www.test.de" rel="nofollow">http://www.test.de</a>&quot;<br />
xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance</a>&quot;&gt;<br />
&lt;Communication&gt;<br />
&lt;DeviceAddress&gt;1&lt;/DeviceAddress&gt;<br />
&lt;/Communication&gt;<br />
&lt;/Config&gt;</p>
<p>und folgendes xsd Schema:</p>
<p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;xsd:schema xmlns:xsd=&quot;<a href="http://www.w3.org/2001/XMLSchema" rel="nofollow">http://www.w3.org/2001/XMLSchema</a>&quot;<br />
xmlns=&quot;<a href="http://www.test.de" rel="nofollow">http://www.test.de</a>&quot;<br />
targetNamespace=&quot;<a href="http://www.test.de" rel="nofollow">http://www.test.de</a>&quot;<br />
elementFormDefault=&quot;qualified&quot;&gt;<br />
&lt;xsd:element name=&quot;Config&quot; type=&quot;TConfig&quot; /&gt;</p>
<p>&lt;xsd:simpleType name=&quot;TByte&quot;&gt;<br />
&lt;xsd:restriction base=&quot;xsd:integer&quot;&gt;<br />
&lt;xsd:minInclusive value=&quot;0&quot; /&gt;<br />
&lt;xsd:maxInclusive value=&quot;255&quot; /&gt;<br />
&lt;/xsd:restriction&gt;<br />
&lt;/xsd:simpleType&gt;</p>
<p>&lt;xsd:complexType name=&quot;TConfig&quot;&gt;<br />
<a href="xsd:sequence" rel="nofollow">xsd:sequence</a><br />
&lt;xsd:element name=&quot;Communication&quot;&gt;<br />
<a href="xsd:complexType" rel="nofollow">xsd:complexType</a><br />
<a href="xsd:sequence" rel="nofollow">xsd:sequence</a><br />
&lt;xsd:element name=&quot;DeviceAddress&quot; type=&quot;TByte&quot; /&gt;<br />
&lt;/xsd:sequence&gt;<br />
&lt;/xsd:complexType&gt;<br />
&lt;/xsd:element&gt;<br />
&lt;/xsd:sequence&gt;<br />
&lt;/xsd:complexType&gt;<br />
&lt;/xsd:schema&gt;</p>
<p>Diese Datei kann ich auch gut lesen unter Borland. Meine frage ist: Wenn ich diese Datei auch aus dem Borland erzeugen will, wie bekomme ich die erste Zeile hin ?</p>
<p>&lt;Config<br />
xsi:schemaLocation=&quot;<a href="http://www.test.de" rel="nofollow">http://www.test.de</a> Config1.xsd&quot;<br />
xmlns=&quot;<a href="http://www.test.de" rel="nofollow">http://www.test.de</a>&quot;<br />
xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance</a>&quot;&gt;</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210922</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210922</guid><dc:creator><![CDATA[maikhaenig]]></dc:creator><pubDate>Fri, 25 Oct 2013 09:34:20 GMT</pubDate></item><item><title><![CDATA[Reply to XML-Element wird nicht gefunden on Fri, 25 Oct 2013 09:34:37 GMT]]></title><description><![CDATA[<p>achso ich habe schon</p>
<pre><code class="language-cpp">pXML = new TXMLDocument(&quot;&quot;);
      pXML-&gt;Options = pXML-&gt;Options &lt;&lt; doNodeAutoIndent;
      pXML-&gt;Active = true;
      pXML-&gt;Encoding = &quot;UTF-8&quot;;

      pXML-&gt;DocumentElement = pXML-&gt;CreateElement(&quot;Config&quot;, &quot;http://www.test.de&quot;);

      pXML-&gt;DocumentElement-&gt;AddChild(&quot;Communication&quot;);
      pXML-&gt;DocumentElement-&gt;ChildNodes-&gt;FindNode(&quot;Communication&quot;)-&gt;AddChild(&quot;DeviceAddress&quot;);
      pXML-&gt;DocumentElement-&gt;ChildNodes-&gt;FindNode(&quot;Communication&quot;)-&gt;ChildNodes-&gt;FindNode(&quot;DeviceAddress&quot;)-&gt;NodeValue = 1;
      pXML-&gt;SaveToFile(&quot;ConfigTest2.xml&quot;);
      delete pXML;
</code></pre>
<p>dies gibt mir folgendes:</p>
<p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;Config xmlns=&quot;<a href="http://www.test.de" rel="nofollow">http://www.test.de</a>&quot;&gt;<br />
&lt;Communication&gt;<br />
&lt;DeviceAddress&gt;1&lt;/DeviceAddress&gt;<br />
&lt;/Communication&gt;<br />
&lt;/Config&gt;</p>
<p>jetzt ist die frage wie bekomme ich die beiden zeilen:</p>
<p>xsi:schemaLocation=&quot;<a href="http://www.test.de" rel="nofollow">http://www.test.de</a> Config1.xsd&quot;<br />
xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance</a>&quot;</p>
<p>noch hinein</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1211346</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211346</guid><dc:creator><![CDATA[maikhaenig]]></dc:creator><pubDate>Fri, 25 Oct 2013 09:34:37 GMT</pubDate></item></channel></rss>