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 Manjote Haworth <ma...@awardsolutions.com> on 2001/04/12 00:29:38 UTC

XSD type information for elements in an XML document

Hi,

I have a question regarding determining the xsd type of an xml element.

After I have parsed an XML document using an XML Schema (with validation
turned on in the parser) , is there a way for me to get the xsd type for an
element in the resulting DOM or JDOM tree?

Is there a way to get the xsd type information for elements using SAX events
during the parsing?

Has anyone else needed the xsd type information for xml elements. If so, how
did you do it?

Basically I want to use the XML schema to do validation as well as to do get
type information for the elements.

Many thanks,
Manjote

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Manjote Haworth
Award Solutions, Inc.
800 E. Campbell Rd., Suite 120
Richardson, TX 75081
P: (972) 664-0727 x240
F: (972) 664-0729
Email: manjote@awardsolutions.com
www.awardsolutions.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Re: XSD type information for elements in an XML document

Posted by Chetan Chudasama <cc...@nms.fnc.fujitsu.com>.
I am also looking at something similar, I just want to get
type information. Unfortunately there is no eas yway to
access this information currently. I have looked at Oracle's
XDK and also Castor. Oracle's XDK provides a Schema
Processor and I tried it but it is just not ready, there are
a few bugs and the documentation is not complete. Castor
provides a schema compiler which generates class files for
the schema types. For me this is not what I was looking for.

This leaves us with the option of reading the XMl Schema
file (it is an XML file) and then using the DOM to access
the various types. I am currently using JDOM to access the
various portions of the schema file. In fact I am trying to
create a layer which will have a better object
representation of the scehma types similar to the DOM.
Hope this answers your query...

Cheers,
Chetan

Manjote Haworth wrote:

> Hi,
>
> I have a question regarding determining the xsd type of an
> xml element.
>
> After I have parsed an XML document using an XML Schema
> (with validation turned on in the parser) , is there a way
> for me to get the xsd type for an element in the resulting
> DOM or JDOM tree?
>
> Is there a way to get the xsd type information for
> elements using SAX events during the parsing?
>
> Has anyone else needed the xsd type information for xml
> elements. If so, how did you do it?
>
> Basically I want to use the XML schema to do validation as
> well as to do get type information for the elements.
>
> Many thanks,
> Manjote
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Manjote Haworth
> Award Solutions, Inc.
> 800 E. Campbell Rd., Suite 120
> Richardson, TX 75081
> P: (972) 664-0727 x240
> F: (972) 664-0729
> Email: manjote@awardsolutions.com
> www.awardsolutions.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>

--
Chetan Chudasama
Fujitsu Network Communications
Call: (408) 895 1707
Email: cchetan@nms.fnc.fujitsu.com




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