SAXParserFactory spf = SAXParserFactory.newInstance();
                SAXParser sp = spf.newSAXParser();

                XMLReader xr = sp.getXMLReader();
                SearchHandler sh=new SearchHandler();
                xr.setContentHandler(sh);
                String query="xml query";

                Log.e("Query:Disaplay mail", query);
                URL url=new URL(query);
                InputSource is=new InputSource();
                is.setEncoding("UTF-8");
                is.setByteStream(url.openStream());
                xr.parse(is);

This is the parser am using... SearchHandler extends DefaultHandler.
My problem is in XML file.. i have a node called "emial" under that
"content" is the attribute, in that content I'll get some text that
text is have \n and \r.

Does my SearchHandler recognize the \n or \r symbol or should I use
any different parser.
On Nov 23, 9:31 am, Frank Weiss <fewe...@gmail.com> wrote:
> Please provide more details.
>
> 1. Since you mention "symbols", are you using a push or pull SAX parser?
> 2. Newlines between *opening* XML elements are typically ignored, not by the
> parser itself, but by the handler.
> 3. Newlines in a text node ("characters") are significant. Is this the case
> you are talking about?
> 4. Newlines in CDATA nodes should also be signifacnt. Is this the case you
> are talking about?
> 5. Newlines and carriage returns, 0x0A, 0x0D, are identical whether encode
> in Latin-1 or UTF-8. I doubt this is the issue.
>
> Can you give a concrete example, please.

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

Reply via email to