Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] [MOXy] how to write out schema location?

Hi Polly,

The schemaLocation and noNamespaceSchemaLocation are set on the XMLMarshaller:

xmlMarshaller.setSchemaLocation(" c:\stuff\blah.xsd");


amphoras wrote:

I have just noticed that my marshalled XML document does not contain the
xsi:schemaLocation attribute in the root element.  What do I need to specify
to get this to show up?  I already have this in my class mapping for the
root element:


         <schema xsi:type="schema-file-reference">

I expected the schemaLocation to be generated to be something like this:

xsi:schemaLocation=' c:\stuff\blah.xsd'

Note that I noticed this for a basic one root-element to one Java class
mapping, though I wouldn't be surprised if I hosed something in my
experiments with multiple root-elements.

Any help would be greatly appreciated.


Back to the top