You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Simon Matic Langford <es...@yahoo.co.uk> on 2006/11/22 15:47:45 UTC
Ignoring processing instructions
Hi,
I'd like to get jaxme to ignore processing instructions (rather than throw an exception). I can't find anywhere how to do this, any ideas?
The doc I am trying to unmarshall is as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="/rest/apiStylesheet.xsl" ?>
</api>
The error I get is:
javax.xml.bind.UnmarshalException: JM_EVENT_PROCESSING_INSTRUCTION: Don't know how to handle processing instructions.
at org.apache.ws.jaxme.impl.JMUnmarshallerImpl.unmarshal(JMUnmarshallerImpl.java:97)
at org.apache.ws.jaxme.impl.JMUnmarshallerImpl.unmarshal(JMUnmarshallerImpl.java:83)
at TestGames.main(TestGames.java:50)
Caused by:
org.xml.sax.SAXParseException: JM_EVENT_PROCESSING_INSTRUCTION: Don't know how to handle processing instructions.
at org.apache.ws.jaxme.impl.JMUnmarshallerHandlerImpl.handleEvent(JMUnmarshallerHandlerImpl.java:266)
at org.apache.ws.jaxme.impl.JMUnmarshallerHandlerImpl.validationEvent(JMUnmarshallerHandlerImpl.java:244)
at org.apache.ws.jaxme.impl.JMUnmarshallerHandlerImpl.processingInstruction(JMUnmarshallerHandlerImpl.java:233)
at org.apache.xerces.parsers.AbstractSAXParser.processingInstruction(Unknown Source)
...
I'm happy to extend JMUnmarshallerHandlerImpl to change the behaviour, but I can't see anyway of configuring a different impl and don't want to fork the code.
Simon
Send instant messages to your online friends http://uk.messenger.yahoo.com