You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Buchleitner Martin <ma...@sbox.tugraz.at> on 2003/07/29 10:08:53 UTC

DOMParser - Problem

Hi!


I have to change an existing interface, my problem is that i do not know
where to start...
The Java-API  gets as input an XML-File and an DTD-File to match.
But in the XML-File there is not DOCTYPE specified, and - so i think -
there results the error. If i assign an DTD manually, then the error
isn't raised.
But i can not tell all the users to assign DTDs before using this tool.
[ Error-Ouptuts at the bottom of the document ]

I would be glade of any information to solve this problem ..

Thanks in advance, Martin


Here is my Error-Output from the ErrorHandler;
** Parsing error, line 3, uri file:D:/docs/debugdocs/list1.xml
   Document root element "w:wordDocument", must match DOCTYPE
   root "null".

And here the Error-Output of System.err:
org.xml.sax.SAXParseException: Document root element "w:wordDocument",
must match DOCTYPE root "null".
	at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:267)
	at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:151)
	at oooxml.OOFilter.openXML(OOFilter.java:102)
	at oooxml.OOGui.openXML(OOGui.java:801)
	at oooxml.OpenChooser.actionPerformed(OpenChooser.java:77)
	at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
	at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
	at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
	at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
	at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
	at java.awt.Component.processMouseEvent(Component.java:5134)
	at java.awt.Component.processEvent(Component.java:4931)
	at java.awt.Container.processEvent(Container.java:1566)
	at java.awt.Component.dispatchEventImpl(Component.java:3639)
	at java.awt.Container.dispatchEventImpl(Container.java:1623)
	at java.awt.Component.dispatchEvent(Component.java:3480)
	at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
	at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
	at java.awt.Container.dispatchEventImpl(Container.java:1609)
	at java.awt.Window.dispatchEventImpl(Window.java:1590)
	at java.awt.Component.dispatchEvent(Component.java:3480)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:140)
	at java.awt.Dialog.show(Dialog.java:551)
	at java.awt.Component.show(Component.java:1134)
	at java.awt.Component.setVisible(Component.java:1089)
	at oooxml.OOGui.actionPerformed(OOGui.java:1105)
	at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
	at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
	at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
	at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
	at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
	at
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:227)
	at java.awt.Component.processMouseEvent(Component.java:5134)
	at java.awt.Component.processEvent(Component.java:4931)
	at java.awt.Container.processEvent(Container.java:1566)
	at java.awt.Component.dispatchEventImpl(Component.java:3639)
	at java.awt.Container.dispatchEventImpl(Container.java:1623)
	at java.awt.Component.dispatchEvent(Component.java:3480)
	at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
	at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
	at java.awt.Container.dispatchEventImpl(Container.java:1609)
	at java.awt.Window.dispatchEventImpl(Window.java:1590)
	at java.awt.Component.dispatchEvent(Component.java:3480)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)


--
 _    _
|  \/  |artin  _      EMail: mabu@sbox.tugraz.at
| |\/| |______|_)__________________________________
|_|  |_|      |_)uchleitner          ICQ: #13889764


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org