Note that there are some explanatory texts on larger screens.

plurals
  1. POConvert xml incoming file to text
    text
    copied!<p>I receive an XML file through Websphere Message Broker, but when I process it with Java it gives me a non formatted file in the output.</p> <blockquote> <p>the XML input file :</p> </blockquote> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;article href="http://www.ensa-agadir.ac.ma/arti234"&gt; &lt;titre&gt;application de web sémantique&lt;/titre&gt; &lt;nombrePages&gt;12&lt;/nombrePages&gt; &lt;auteur rond="principale"&gt; &lt;nom&gt;Hassani&lt;/nom&gt; &lt;prenom&gt;Jamal&lt;/prenom&gt; &lt;etablissement&gt;Ensa-Agadir&lt;/etablissement&gt; &lt;/auteur&gt; &lt;/article&gt; </code></pre> <blockquote> <p>Java compute (for processing message) :</p> </blockquote> <pre><code>MbMessage outMessage = new MbMessage(); MbMessageAssembly outAssembly = new MbMessageAssembly(assembly, outMessage); MbElement omroot = outMessage.getRootElement(); MbElement xmlnsc = omroot.createElementAsLastChild ("XMLNSC"); MbElement valueEl = xmlnsc.createElementAsFirstChild(MbElement.TYPE_VALUE, "VALUE", new String ((byte[])message.getRootElement ().getFirstElementByPath("/BLOB/BLOB").getValue())); out.propagate(outAssembly); </code></pre> <blockquote> <p>the XML output file : <img src="https://i.stack.imgur.com/UjQsX.png" alt="enter image description here"></p> </blockquote> <p>like it's not recognizing any utf-8 characters like : <strong>quotes</strong> or <strong>&lt;</strong> and <strong>></strong> etc... so I think that converting the incoming file to text will solve the problem. But I don't know how to do it, or if it's the best solution.</p> <p>Do you have any idea about this ? Thank you :)</p> <p><strong>Edit :</strong> the message shouldn't just be escaped, it should be converted and well encoded to the output. </p>
 

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