govelogo <govel...@gmail.com> wrote on 07/03/2009 12:39:55 AM:

> Hi Michael,
>
> I thought this would solve my problem. But I run into an order issue.
>
> What I want is to be able to match from a uri to its prefix while
> parsing through an xml. It seems startPrefixMapping() is paired
> with startElement(). So if there is a xsi:type attribute of the
> element pointing to a new type yet been parsed, I won't be able to
> find the prefix in the uri -> prefix hashtable I have been keep tracking.

Um... why not? The startPrefixMapping() calls come first. You should always
have all the information you need to do prefix -> uri mapping on any
startElement()..

> It seems to me that a SAX parser may not work for what I want. Is
> there a sample using a DOM parser to traverse a DOM tree and still
> be able to use JAXP to get TypeInfo and ElementPSVI?

There are plenty of samples, FAQs and articles which show how to use or
talk about how to use these things in isolation, but you'd probably have to
connect the dots yourself.

> thanks a lot,
> David

Thanks.

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

Reply via email to