It is error In My example. For example:
1. My view.xhtml like that:
...
<xhtml:script>
<![CDATA[
//this is comment
function hello(){
........
}
]]>
</xhtml:script>
...
2. I serilizered xformed-data, the file content like that:
...
<xhtml:script><![CDATA[//this is comment function hello(){ ... }]]></xhtml:script>
....
3. load serilizered file to http, It is error. error message is "not found hello function"
在2010-01-20 11:11:12,"Alessandro Vernet" <[hidden email]> 写道:
Yes, this is because this information is part of the SAX LexicalHandler, which we don't support. But note that the CDATA markers are just syntactic sugar, and a document without them should be considered equivalent.(BTW, I am not sure what happened, but I got your message 8 times through the mailing list.)AlexHi,
In OPS, I want to process a Document using XMLReader. But CDATA is lose. For example:
public static void main(String[] args) throws SAXException, IOException{
Document outData = DocumentHelper.createDocument();
Element root = outData.addElement("root");
root.addElement("script").addCDATA("HELLO");
root.addElement("head").addText(" world");
SAXStore store = new SAXStore();
final XMLReader xmlReader = XMLUtils.newSAXParser().getXMLReader();
xmlReader.setContentHandler(store);
xmlReader.parse(new DocumentSource(outData).getInputSource());
System.o ut.println(Dom4jUtils.domToString(store.getDocument()));
}
The output is that:
<root>
<script>HELLO</script>
<head>world</head>
</root>
I want to output:
<root>
<script><![CDATA[HELLO]]></script>
<head>world</head>
</root>
--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws
Free forum by Nabble | Edit this page |