xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: "Daniel Garrido" <djbgarrido AT gmail.com>
- To: XOM-interest AT lists.ibiblio.org
- Subject: [XOM-interest] Defining schema location
- Date: Mon, 10 Mar 2008 18:11:09 +0000
Hi!
I'd like to know how to create the root element with the following
definitions:
<cns:Constraints xmlns:cns="http://www.example.org/Constraints"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.org/Constraints
../../../Structures/Constraints/Constraints.xsd ">
...
</cns:Constraints>
I've already been able to write a xml with all namespace definitions,
but not with the schemaLocation. Nextly i'll post the code i'm using:
String namespace = "http://www.example.org/Constraints";
String prefix = "cns:";
Element root = new Element(prefix + "Constraints", namespace);
root.addNamespaceDeclaration("xsi",
"http://www.w3.org/2001/XMLSchema-instance");
Thanks in advance for your time,
Daniel Garrido
-
[XOM-interest] Defining schema location,
Daniel Garrido, 03/10/2008
- Re: [XOM-interest] Defining schema location, Elliotte Harold, 03/10/2008
Archive powered by MHonArc 2.6.24.