Put your text between CDATA element and you'll be allright. Label only accept plain text and no html. You should use HTML widget or a widget that have sethtml instead
Ex JAVA code for CDATA : > Element productDescription = xml.createElement(*PRODUCTDESCRIPTIONTAG*); > Text productDescriptionText = xml.createCDATASection(*this*. > productDescription); > productDescription.appendChild(productDescriptionText); > product.appendChild(productDescription); > and then you can read it like everything else > this.productDescription = objectElement.getElementsByTagName( > "productDescription").item(0).getFirstChild().getNodeValue(); > Hope i'tll help you ! Christian > On Wed, Aug 5, 2009 at 10:52 AM, Nickelnext <[email protected]> wrote: > > Hi all > > I have some small problems with XML data in my Gwt project. > Let's get started: > > 1) When i get back data from a requestBuilder that reads a config.xml > file, > > (code inside onResponseReceived of sendRequest) > > document = XMLParser.parse(response.getText()); > succ = true; > XMLParser.removeWhitespace(document); > element = (Element) document.getDocumentElement(); > > now, i can retrieve all data from xml, but the parser seems to ignore > carriage returns and new line in xml data. > > I.E. > > <content>Text here text here. > text here. > text here. > </content> > > I read somewhere on the net that XML parsers like DOM or SAX simply > ignore every line, space, carriage return or something. Is it true? > How can i avoid to this problem? I also tried to insert in text things > like & # 10; or others & commands but it does not work, neither using > some html tags inside like <br />. > > Another related problem is that I have a Java Plain Servlet that > returns some xml formatted strings with response.setcontenttype("text/ > html"); and when i get this text with event.getresults(), i add it to > a label or other but i cannot format it, even if i use the simple > String.replace("><",">\n<"); or String.resplace("><","><br /><"); > > How can i indent the xml data got from the servlet? > > Thank you! > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
