Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML Square symbol

 
e vanduffel
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your xml, instead of




that is use the unicode value of � =>& #x00B2;, there is no space between & and #
 
e vanduffel
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic