You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Adrián Cuartero <ad...@yahoo.es> on 2008/06/15 12:04:14 UTC
New base64 node encoding
Hi all
I'm working with xmlbeans in a jvm with utf-8 as default encoding.
When i try to make a new xml file with one of it nodes as base64 type xmlbeans ecodes it worng.
I've tryed something like this
ResponserootDocument rdoc = ResponserootDocument.Factory.newInstance();
rdoc.documentProperties().setEncoding("UTF-8");
Responseroot raiz = rdoc.addNewResponseroot();
noNamespace.ResponseDocument.Response res;
res.setPath(response[0][0]);
try{
String enc="Ejemplo de implementación en LIP";
res.addValue(enc.getBytes("UTF-8"));
}
}catch(Exception e){}
}
}
XmlCursor cursor = rdoc.newCursor();
if (cursor.toFirstChild()) {
cursor.setAttributeText(new QName(
"http://www.w3.org/2001/XMLSchema-instance",
"noNamespaceSchemaLocation"), "Response.xsd");
}
//op.setCharacterEncoding("UTF-8");
String temp = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ raiz.xmlText(op);
If i write the temp String the base64 node created has wrong codification and when i decode it i take this
Ejemplo de implementación en LIP
Anyone knows what's wrong?
Thanks
______________________________________________
Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.