File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes XML Square symbol Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Square symbol" Watch "XML Square symbol" New topic
Author

XML Square symbol

e vanduffel
Greenhorn

Joined: Nov 04, 2003
Posts: 12
Hi all,

I am using a java program to send an XML over http to a server.
Everything seems to work fine, the only problem occurs when the square symbol is inserted in the XML

Some thing like 'M�' gives me an error:

Is there some special translation that i must do?

Kindest regards,

Wout


ErrorMessage:
org.xml.sax.SAXParseException: The element type "C16" must be terminated by the matching end-tag "</
C16>".
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196)
at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.jav
a:579)
at org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanner.java:628)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScan
ner.java:1136)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:195)
at scorex.transact.tools.XmlReader.<init>(XmlReader.java:44)
at scorex.transact.sdk.TransactSdk.doStoredProcedure(TransactSdk.java:120)
at OAdpTransact.Utils.JavaServices.GetScoringResult(JavaServices.java:208)
at java.lang.reflect.Method.invoke(Native Method)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:287)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:344)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:153)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:577)
at com.wm.lang.flow.FlowState.stepIncremental(FlowState.java:491)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:373)
at wm.server.flowimpl.stepFlow(flowimpl.java:183)
at java.lang.reflect.Method.invoke(Native Method)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:294)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:344)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequest
Handler.java:97)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:167)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:204)
at com.wm.util.pool.PooledThread.run(PooledThread.java:105)
at java.lang.Thread.run(Thread.java:484)
No data found (Missing tag C17 - Lastname).
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
In your xml, instead of




that is use the unicode value of � =>& #x00B2;, there is no space between & and #


Spritle Software Blogs
e vanduffel
Greenhorn

Joined: Nov 04, 2003
Posts: 12
isn't there a way to set the encoding for the XML Send so that the parser knows it must expect such a character?

Kindest regards,

Wout
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by e vanduffel:
isn't there a way to set the encoding for the XML Send so that the parser knows it must expect such a character?

Kindest regards,

Wout


Not sure about that, but your parser will expect you to have correctly encoded XML for parsing, representing xml values in UTF-8 format is one way to avoid this error.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML Square symbol