You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Don Stewart <Do...@corizon.com> on 2004/10/08 14:34:42 UTC

FW: Reading in previously saved XML Document

I could do with some help as I cannot work out what I'm doing wrong
here.

I've now added the <?xml version="1.0" encoding="UTF-8"?>

To the file and it still throws an XmlException.

 

  _____  

From: Don Stewart 
Sent: 07 October 2004 09:37
To: xmlbeans-user@xml.apache.org
Subject: Reading in previously saved XML Document

 

Hi,

 

I am getting an error when reading in a previously saved & validated
document. The error is

 

org.apache.xmlbeans.XmlException: error: The markup in the document
preceding the root element must be well-formed.

 

There are no tags before the root element including no <?xml
version="1.0" encoding="UTF-8"?> tag.

The root element is the first in the file and is:-

 

<jar:jar name="GatewayNavmapClientBeans"
xmlns:jar="http://www.corizon.com/ps/AdapterFramework/util/jar2ws">

 

 

So I have a couple of questions.

 

1)                             I see you can get the
XmlDocumentProperties using an inherited call
XmlTokenSource.documentProperties()

 

and I can then set the version using setVersion
<http://xmlbeans.apache.org/docs/reference/org/apache/xmlbeans/XmlDocume
ntProperties.html#setVersion%28java.lang.String%29> (String
<http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html>
version). However, is this a live reference or do I need a set method?
I've tried using setVersion but it makes no difference when I write the
file out.

 

2)      Do I need to set the SchemaType on XmlOptions before doing the
parse?

 

Thanks in advance.

 

Don

 

 

don stewart| technical architect |email: donald.stewart@corizon.com |
web: www.corizon.com | office: +44(0)20 7539 6832 | mobile:
+44(0)7870553878

 <http://www.corizon.com>   

This e-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to which they
are addressed. Any unauthorised dissemination or copying of this e-mail
or its attachments, and any use or disclosure of any information
contained in them, is strictly prohibited and may be illegal. If you
have received this e-mail in error, please notify the sender immediately
and then destroy any copies of it. Any views expressed in this e-mail
are those of the individual sender, except where the sender specifically
states them to be the views of Corizon.