Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Error tells it all, the xml you are trying to load is invalid and Stream element is not closed Your xml</p> <pre><code>&lt;stream:stream id=\"3DAC47EA\" from=\"chat.facebook.com\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" xml:lang=\"en\"&gt; &lt;stream:features&gt; &lt;mechanisms xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"&gt; &lt;mechanism&gt; X-FACEBOOK-PLATFORM &lt;/mechanism&gt; &lt;mechanism&gt; DIGEST-MD5 &lt;/mechanism&gt; &lt;/mechanisms&gt; &lt;/stream:features&gt; &lt;challenge xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"&gt; dmVyc2lvbj0xJm1ldGhvZD1hdXRoLnhtcHBfbG9naW4mbm9uY2U9QjNBOUU4NzJFQUJGNkQ5RDM0RTZDNjgzMjkyMTBGOEQ= &lt;/challenge&gt; </code></pre> <p>Your document lacks a root node, and the "stream" element is not closed. Correcting the xml document will fix the error.</p> <p>The stream element must be fixed as </p> <pre><code>&lt;stream:stream id=\"3DAC47EA\" from=\"chat.facebook.com\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" xml:lang=\"en\"&gt; ... &lt;/stream:stream&gt; </code></pre> <p>And your other elements comes inside the stream element <strong>if</strong> it is the root for your document.</p> <p>As you are taking it as a string in your code example (in your question) you can just append the missing stream as below and the pass it to the xmlreader as usual,</p> <p><strong>(*Note: this is only a workaround based on your example, but I donot understand how you are getting invalid XML as a response from a server.)</strong></p> <pre><code>Xmlstring = Xmlstring + "&lt;/stream:stream&gt;"; </code></pre> <p>This makes the xml valid and you can get load it to the document as usual.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload