xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
[XOM-interest] Problem creating the right namespace.
- From: "Christian-Josef Schrattenthaler" <hotline AT software-agentur.com>
- To: <xom-interest AT lists.ibiblio.org>
- Subject: [XOM-interest] Problem creating the right namespace.
- Date: Wed, 25 Feb 2009 10:05:11 +0100
Hi!
I have to use xml files for a little Java project. These files are
generated over the Java application itself, but I have to use an
external xml schema.
The root element must look like:
<rootelement xmlns=http://... xmlns:xsi=http://...
xsi:schemaLocation="http://...">
I did:
Element xmlRoot = new Element("onlv",
"http://www.oenorm.at/schema/A2063/2009-01-15");
xmlRoot.addNamespaceDeclaration("xsi",
"http://www.w3.org/2001/XMLSchema-instance");
But now I don't know how to add 'xsi:schemaLocation="http://..."', and I
have an empty (xmlns="") attribute on each child element I add to the
root element.
This generates an error, while validating the xml file against the
external xml schema.
I tried also to add a second parameter "" while creating the element,
but this doesn't work.
I googled for the problem, but I didn't find anything useful
Kind greetings,
Christian.
-
[XOM-interest] Problem creating the right namespace.,
Christian-Josef Schrattenthaler, 02/25/2009
- Re: [XOM-interest] Problem creating the right namespace., Michael Kay, 02/25/2009
- Re: [XOM-interest] Problem creating the right namespace., Elliotte Harold, 02/25/2009
- <Possible follow-up(s)>
- Re: [XOM-interest] Problem creating the right namespace., Christian-Josef Schrattenthaler, 02/25/2009
Archive powered by MHonArc 2.6.24.