[email protected] wrote:
> Hi,
> 
> I'm having hard time parsing special characters such as '&' with the
> default handler provided in org.xml.sax.helpers.
> 
> Basically, the parser reads up to where it encounters '&' and skips
> the rest.
> 
> I tried escaping the with & and & but none worked. Any ideas?

I just ran into a similar case with the DOM. In my case, I had an
element akin to:

<name>Foo &amp; Bar</name>

The DOM had three text nodes inside the Element:

-- One with "Foo "
-- One with "&"
-- One with "amp; Bar"

I had expected perhaps two text nodes and an EntityReference or
something, but my DOM-fu is weak, so perhaps this is the proper result.

If this same pattern affects SAX, it may be you are getting several text
nodes but are only paying attention to the first.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Published!

--~--~---------~--~----~------------~-------~--~----~
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