Re: If an element is a simple or array element

2009-06-28 Thread Michael Glavassevich
Mukul Gandhi wrote on 06/23/2009 11:30:31 PM: > Hi David, > > On Wed, Jun 24, 2009 at 6:35 AM, govelogo wrote: > > But I got this error, > > error: Parse error occurred - > > com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl > > java.lang.ClassCastException: > > com.sun.org

Re: If an element is a simple or array element

2009-06-24 Thread govelogo
Hi Mukul and Michael, Just out of a quick try, it seems made a difference and should be able to get me what I want. thanks a lot, -david On Wed, Jun 24, 2009 at 12:30 AM, Mukul Gandhi wrote: > Hi David, > > On Wed, Jun 24, 2009 at 6:35 AM, govelogo wrote: > > But I got this error, > > error: Par

Re: If an element is a simple or array element

2009-06-23 Thread Mukul Gandhi
Hi David, On Wed, Jun 24, 2009 at 6:35 AM, govelogo wrote: > But I got this error, > error: Parse error occurred - > com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl > java.lang.ClassCastException: > com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl >  

Re: If an element is a simple or array element

2009-06-23 Thread govelogo
Hi Michael, In the "jaxp.TypeInfoWriter" sample main() method, after the creation of "ValidatorHandler" line, ValidatorHandler validator = schema.newValidatorHandler(); I added this line, writer.setPSVIProvider((org.apache.xerces.xs.PSVIProvider)validator); But I got this error, error: P

Re: If an element is a simple or array element

2009-06-23 Thread Michael Glavassevich
govelogo wrote on 06/23/2009 07:26:55 AM: > Do you mean I can cast "javax.xml.validation.ValidatorHandler" into > a "org.apache.xerces.xs.PSVIProvider"? I can not see how to do that > from java their doc. Have you tried this? It should work. See "How do I access PSVI via the JAXP 1.3 Validation

Re: If an element is a simple or array element

2009-06-23 Thread govelogo
Hi Mukul, Sorry. I mean "array type" is a complex type with a sequence of elements. ElementPSVI is the object I figured that could get me the information. However, I have two issues; one is that I could not have "simpletype.DatatypeInterfaceUsage" working for some reason. The 2nd is I don't know h

Re: If an element is a simple or array element

2009-06-23 Thread Mukul Gandhi
On Tue, Jun 23, 2009 at 4:56 PM, govelogo wrote: > My ultimate goal is to be able to tell if a schema type associated to an > element is a simple type or an array type while parsing an xml. I don't understand, what do you mean by "array type". We only have simple type or a complex type. Once you

Re: If an element is a simple or array element

2009-06-23 Thread govelogo
Hi Michael, My ultimate goal is to be able to tell if a schema type associated to an element is a simple type or an array type while parsing an xml. As to how to implement it, I am not sure. I was just trying. Do you mean I can cast "javax.xml.validation.ValidatorHandler" into a "org.apache.xerces

Re: If an element is a simple or array element

2009-06-22 Thread Michael Glavassevich
Hi David, I'm not sure I understand what you're doing. The jaxp.TypeInfoWriter sample shows how to get type information from a JAXP validator. If you're using the JAXP Validation API the PSVIProvider is the ValidatorHandler not the SAX parser. Thanks. Michael Glavassevich XML Parser Development