Hi, I would like to parse a XML document where attribute CDATA contains both quotes and double quotes. My XML is like that : <personne> <Nom>Hello "World" what's up ?</Nom> <ville> <Nom>Kansas City</Nom> </ville> </personne> My Xpath request is : XPath xpathSelector2 = DocumentHelper.createXPath("//personne[Nom='Hello "World" what's up ?']/ville/Nom"); List results2 = xpathSelector2.selectNodes(documentXml); My Xpath request give this result : org.dom4j.InvalidXPathException: Invalid XPath expression: //personne[Nom='Hello "World" what's up ?']/ville/Nom Expected: ] at org.dom4j.xpath.DefaultXPath.parse(DefaultXPath.java:315) at org.dom4j.xpath.DefaultXPath.<init>(DefaultXPath.java:51) at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:196) at org.dom4j.DocumentHelper.createXPath(DocumentHelper.java:106) at salomeTMF_plug.pluginxlsxml.Export.FromXmlToExcel.ReadXMLFile(FromXmlToExcel.java:385) at salomeTMF_plug.pluginxlsxml.Export.FromXmlToExcel.<init>(FromXmlToExcel.java:105) at salomeTMF_plug.pluginxlsxml.Export.ExportDialog.exporter(ExportDialog.java:317) at salomeTMF_plug.pluginxlsxml.Export.ExportDialog$2$1.run(ExportDialog.java:169) I've tried to replace the quote by "'" (double, single, double) but it doesn't work. Its the same by " in the xpath but it still doesn't work.(ps : I cant modify the XML file even if he is not well formed) Have you got any idea ? thanks James
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user