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 "Decoker, Lydie (Lydie)" <de...@lucent.com> on 2006/10/09 16:54:32 UTC

Generate a DOM tree from a schema

Hello,
 
Is it possible to generate a DOM tree from a schema? I would like to use
this tree as the skeleton of the message to be created. In that way, I
would only need to fill the value of the elements.
 
Thx in advance,
 
Lydie

Re: Generate a DOM tree from a schema

Posted by Prashant <pr...@pramati.com>.
You could try JAX-B.

https://jaxb.dev.java.net/
Short Article : 
http://java.sun.com/developer/technicalArticles/WebServices/jaxb/index.html

JAXB will allow you to create a Java Bean Tree given a Schema. You can 
then instantiate this Java Bean tree according your input ask JAXB API 
to 'marshall' the Java Bean tree to a XML file.

-Prashant

Decoker, Lydie (Lydie) wrote:
> Hello,
>  
> Is it possible to generate a DOM tree from a schema? I would like to 
> use this tree as the skeleton of the message to be created. In that 
> way, I would only need to fill the value of the elements.
>  
> Thx in advance,
>  
> Lydie


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


Re: Generate a DOM tree from a schema

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
"Decoker, Lydie \(Lydie\)" <de...@lucent.com> wrote on 10/09/2006 
10:54:32 AM:

> Hello,
> 
> Is it possible to generate a DOM tree from a schema? I would like to
> use this tree as the skeleton of the message to be created. In that 
> way, I would only need to fill the value of the elements.

If you're looking for something in Xerces which auto-magically does this 
for you it doesn't exist. You have to write the code yourself by building 
a model [1] of the schema and then walking it to create your concept of a 
skeleton DOM. Perhaps there are already XML tools around which could help 
you with that.
 
> Thx in advance,
> 
> Lydie

[1] 
http://xerces.apache.org/xerces2-j/javadocs/xs/org/apache/xerces/xs/XSModel.html

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

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