So what is it you're asking for DOM or SAX?
Android uses standard classes for both cases. Maybe you should run your
samples on a standard sdk  just for comparison?

startElement() is SAX, not DOM.

I also don't get the major issue. In XML attributes cannot have children. So
you probably mean something else, but I didn't get that.

On Thu, May 21, 2009 at 1:59 AM, Jason Proctor <[email protected]>wrote:

>
> i'm porting some code which talks to the org.w3c.dom.* classes to
> Android, and i'm hitting some issues.
>
> i'm using javax.xml.parsers.SAXParser as my parser, then getting an
> XMLReader and setting myself up as a DefaultHandler to get notified
> of SAX events.
>
> first issue (minor) -- in startElement(), the tag name comes through
> in the localName parameter rather than the qName parameter. this is a
> departure from all the DOM implementations i've used so far.
>
> second issue (major) -- the Android DOM doesn't allow me to add a
> Text node as a child of an Attr. attribute values are conventionally
> held as child nodes. setAttribute() isn't good enough, as i need to
> be able to mix Text and EntityReference as siblings under Attr.
>
> if the Android DOM is just storing attribute values as strings, and
> doesn't allow manipulation of the attribute's children (or maybe
> there aren't any), then that's a fairly serious incompatibility IMHO.
>
> thanks for any help with this one
> --
> jason.software.particle
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to