|
XPathQueryService working?: msg#00047text.xml.exist
Has anyone successfully used the XPathQueryService with the XMLDB api? I have some code which does: ResourceSet resourceSet = service.query(query); ResourceIterator resourceIterator = resourceSet.getIterator(); while (resourceIterator.hasMoreResources()) { xmlResource = (XMLResource) resourceIterator.nextResource(); //get result as string String str = (String) xmlResource.getContent(); //get result as DOM Document doc = (Document) xmlResource.getContentAsDOM(); } When I print out the string I get garbage mixed with xml: ���Ì?�����ä??��UÉ?������ä??��T�ɽ�Ð?��������D�FV��###"6��t���V�S�'G'VR"6��t��6�FV��'G'VR"WF�?��\�OH��[�H��Ü?�OH�Ü?X][Û?]H��Ü?Ü?\�H�^[�ded="false"> <Elements> <Element useDefaultLa�Õ?�����Õ?���Í?5ձѥq�1���Õ?������Õ?��Ù?�ͥ��!��ѽ����&�fb"��7F�'��V�wF��#"��S�$�FV���R"G�S�%6��v�RÆ?Û?H^��]X�H��[�H��\]Z\��perties allowAlphabetic="ON" allowNumeric="ON" allowSpeci��=8�������ME����=8���(��������������Í?ɥ�ѥ���Q�����FV���R�2W6VBF��FV�F�g���FV��B6��V�B&RV�V_�Y����X�K��\�Ü?�[�lement useDefaultLanguage="true" useMultipleLanguages="tr�Õ?��Ù?�ͥ��!��ѽ��ô?½?������ѽ��1ï¿½ï¿½ï¿½Ñ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½%Ñ?����F��""G�S�%6��v�RÆ?�RFW�B"7FF�3�&f�6R"&WV�&VC��\�Y\�[��[X�]X�H�Ó?� [���umeric="ON" allowSpecial="ON" allowSpaces="ON"/> ���Í?ɥ�ѥ���Q���%Ñ?���ѡ�È?͡�ձ��� ..etc.. It seems to be incomplete xml with all kinds of weird unicode characters. When I get the content as DOM I get a SAXParseException: Caused by: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x8) was found in the value of attribute "historyLength" and element is "Class". at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.exist.xmldb.RemoteXMLResource.getContentAsDOM(RemoteXMLResource.java:168) All of this used to work find with Xindice's XPathQueryService, but I'm trying to move to eXist. Does the eXist's XPathQueryService actually work, and if so, how do I do want I want to do with eXist? I'm using the eXist snapshot dated 20040816 running on Jetty, running on Debian GNU Linux. The java webapp which I'm connecting to xindice from via xmlrpc is running inside tomcat 4. Cheers, Dominic -- Dominic Gamble Director Advancen Software Solutions & Multimedia Phone 1300 888 680 Email dominic@xxxxxxxxxxxx Mobile 0402 059 219 Web www.advancen.com Global +61 1300 888 680 PO Box 558, South Melbourne Fax +61 3 9525 3446 VIC 3205, Australia ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Copy resource and collection bugs: 00047, Piotr Kaminski |
|---|---|
| Next by Date: | AW: XPathQueryService working?: 00047, nurfuermailings |
| Previous by Thread: | Copy resource and collection bugsi: 00047, Piotr Kaminski |
| Next by Thread: | AW: XPathQueryService working?: 00047, nurfuermailings |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |