[prev in list] [next in list] [prev in thread] [next in thread]
List: xerces-j-user
Subject: Re: Name-value pairs in xml root tag
From: Michael Glavassevich <mrglavas () ca ! ibm ! com>
Date: 2009-07-03 15:54:18
Message-ID: OF98E96143.BA65FF0C-ON852575E8.0056BD3A-852575E8.00575E96 () ca ! ibm ! com
[Download RAW message or body]
govelogo <govelogo@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=A0startPrefixMapping() is paired
> with=A0startElement(). 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 track=
ing.
Um... why not? The startPrefixMapping() calls come first. You should al=
ways
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 hav=
e to
connect the dots yourself.
> thanks a lot,
> David
Thanks.
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org=
[Attachment #3 (text/html)]
<html><body>
<p><tt>govelogo <govelogo@gmail.com> wrote on 07/03/2009 12:39:55=
AM:<br>
<br>
> Hi Michael,</tt><br>
<tt>> <br>
> I thought this would solve my problem. But I run into an order iss=
ue.=A0</tt><br>
<tt>> <br>
> What I want is to be able to match from a uri to its prefix while =
<br>
> parsing through an xml. It seems=A0startPrefixMapping() is paired =
<br>
> with=A0startElement(). So if there is a xsi:type attribute of the =
<br>
> element pointing to a new type yet been parsed, I won't be able to=
<br>
> find the prefix in the uri -> prefix hashtable I have been keep=
tracking.</tt><br>
<br>
<tt>Um... why not? The startPrefixMapping() calls come first. You shoul=
d always have all the information you need to do prefix -> uri mappi=
ng on any startElement().</tt><br>
<tt><br>
> It seems to me that a SAX parser may not work for what I want. Is =
<br>
> there a sample using a DOM parser to traverse a DOM tree and still=
<br>
> be able to use JAXP to get TypeInfo and ElementPSVI?</tt><br>
<br>
<tt>There are plenty of samples, FAQs and articles which show how to us=
e or talk about how to use these things in isolation, but you'd probabl=
y have to connect the dots yourself.</tt><br>
<tt><br>
> thanks a lot,</tt><br>
<tt>> David</tt><br>
<br>
<tt>Thanks.</tt><br>
<br>
<tt>Michael Glavassevich<br>
XML Parser Development<br>
IBM Toronto Lab<br>
E-mail: mrglavas@ca.ibm.com</tt><br>
<tt>E-mail: mrglavas@apache.org</tt></body></html>=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic