Problems parsing XML in Java with XMLStreamReader -


I have a value here that is responsible for getting the value of the attribute:

  CurrPost.Body = ReaderGetAttiveView ("", "body");   

Therefore, body is the basis of my specialty.

My XML file represents the SQL Server dump and is in this form as follows:

   And #xA; and #xA; amp; lt; Blockquote & amp; amp; amp; amp; amp; l & gt; P & gt; Many German Fairy Tales & Amp; #xA ; & Amp; quot; A war opened with & amp; nbsp; quot ;, but some launches & amp; amp;; & quot; Zoo der Jait, Els Das winson nach & # xa; gehfen cap ... & Amp; quot;. & Amp; lt; / p & gt; & amp; #xA; & #xA; & amp; lt; p & gt; Is there any other normal & amp; #xA; introduction ? If so, then there is a connection between their use and the geographical origin of the story? & Amp; Amp; Amp; Lt; / P & amp; Gt; & Amp; #xA; & Amp; Lt; / Blockquote & amp; Gt; & Amp; #xA, "OwnerUserId =" 4 "LastEditorUserId =" 2 "LastEditDate =" 2011-05-25T05: 39: 54.580 "LastActivityDate =" 2011-05-25T11: 56: 08.270 "title =" gibt es andere übliche Mà ¤rchenbeginnformeln neben & amp; Quot; IS Warfare & amp; Quot;? Tag = "& amp; lt; regional & amp; gt;" Answer = "2" comment property = "2" customcount = "4" />   

The problem is that when I get the "body" value - I always get a small string in which many letters / symbols are remembered.

Take a look at this body is the value

  body = "& amp; amp; l & gt; Ceer ville marche benifinen I ; LT; / P & GT & #xA; & #xA; & amp; lt; p & gt; lt; gibt es noch andere Beginnformeln und Wenn ja, man man dem geographischen Ursprung der Mürchen Zuordnen & amp; diese / p & amp; gt; & amp; #xA; & amp; #xA; & lt; blockquote & gt; & amp; #xA; & amp; Late; P & G; Many German fairy tales & amp; #xA; & amp; quot; A war are enamental & amp; quot; open with some, but some & amp; amp; #xA; & amp; Quot; Zoo der Jait, Els Das winson nach & amp; #aa; geholfen cap ... & amp; quot ;. & lt; / p & g & # xa; and # xa; and late. Is there any other normal & amp; #xA; introduction? If so, is there a connection between the geographical origins of their use and story? & Amp; Lt; / P & gt; & Amp; #xA; & Amp; Lt; / Blockquote & gt; & Amp; #xA, "  

Therefore, when I print only with system.out.println () , I get it only

  & lt; p & gt; Sehr viele Mürchen beginnen auf Deutsch MIT "Es war einmal", aber Ich canon och ein mürchen, das anfängt mit "jad u der zit, als das wånschen noch geholfen Hat ... ".   

As you can see - there are HTML tags in the body value.

Many thanks!

I suspect that this problem Or your code has & amp; #xA; & amp; #xA; it's a U + 000 A, or "line feed" (twice), you can validate that this XML is full See what this does:

  System.out.println ("line1 \ nLine2 \ nLine 3");   < P> Depending on your console, which may appear on several rows, I expect the XML to be with your string as well. My guess is that either you see the line started from the beginning of your specialty text, or your console does not support multiline output. Anyhow, with the quick test given above you should know what is expected .   

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -