We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › help with proXML and PCDATA with accents
Page Index Toggle Pages: 1
help with proXML and PCDATA with accents (Read 244 times)
help with proXML and PCDATA with accents
Sep 19th, 2006, 7:03pm
 
Hi,

I'm using proXML library for XML. It's a very good library. But now I have a problem to save data with accents in a XML and I would like do some similar to this.
Code:

<tag>
<![CDATA[
bla bla blá ó
]]>
</tag>

I don't know, How do that?

I see in proXML there are method implemented "PCDATA", but not "CDATA" and the problem is that in spanish have a lot of accents.

My test code is:
Code:

import proxml.*;

XMLInOut xmlInOut;

void setup(){
xmlInOut = new XMLInOut(this);
XMLElement all = new XMLElement("all");

XMLElement item = new XMLElement("item");
all.addChild(item);
XMLElement item_value = new XMLElement( "ó ñ ", true);
item.addChild(item_value);

xmlInOut.saveTo(all, "myXml.xml");

}

void draw(){

}

String setPCDATA(String temp){
temp = "<![CDATA["+temp+"]]>";
return temp;
}


I think other way was working with the string methods to substitute all accents to html code. But In my point of view is more clear use CDATA.

If someone have suggestions or solutions of this problem...

Mar

Page Index Toggle Pages: 1