Thanks, Michael. I'll look at that.

Best regards,
Rohnny

On 6/8/06, Michael Glavassevich <[EMAIL PROTECTED]> wrote:
Hi Rohnny,

Rohnny Moland <[EMAIL PROTECTED]> wrote on 06/05/2006 01:06:28 PM:

> Hi,
>
> Im new to xerces, and what I am trying to do, is to parse an xml
> document that has been exported from a database. It contains xsd schema
> information (or dtd) about the (db) types, and is organized in a flat
> table-like xml structure. I think this should be a common scenario,
f.ex:
>
> <resultset>
>   <row>
>     <name>..</name>
>     <description>..</description>
>     <isbn>..</isbn>
>   </row>
>   <row>
>     <name>..</name>
>     <description>..</description>
>     <isbn>..</isbn>
>   </row>
> </resultset>
>
> I want to parse the document and retrieve the type information from
> schema for each element, to be able to process the data later in my app.
> How can I retrieve the type information when parsing? I am using SAX.

You can retrieve type information in your ContentHandler from a
TypeInfoProvider [1]. There's a sample called jaxp.TypeInfoWriter [2]
which demonstrates how to do that using the JAXP 1.3 Validation API.

> Thanks in advance,
> Rohnny
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

[1]
http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/validation/TypeInfoProvider.html
[2] http://xerces.apache.org/xerces2-j/samples-jaxp.html#TypeInfoWriter

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to