I have this function in my code

                public final static Document XMLfromString(String xml){
                        Document doc=null;
                        DocumentBuilderFactory dbf = 
DocumentBuilderFactory.newInstance();
                        try {
                                DocumentBuilder db = dbf.newDocumentBuilder();
                                InputSource XMLFile = new InputSource();
                                XMLFile.setCharacterStream(new 
StringReader(xml));
                                doc = db.parse(XMLFile);
                        } catch (ParserConfigurationException e) {
                                System.out.println("XML parse error: " + 
e.getMessage());
                                return null;
                        } catch (SAXException e) {
                                System.out.println("Wrong XML file structure: " 
+ e.getMessage());
                                return null;
                        } catch (IOException e) {
                                System.out.println("I/O exception: " + 
e.getMessage());
                                return null;
                        }
                        return doc;
                }

When I walk through it in the Eclipse debugger, the value for 'xml' is
correct, it's from a file I pick up on the server and it's showing
correctly.
When I check the value it's fine going into the doc =
db.parse(XMLFile) at which time the doc shows nothing, so apparantly
the DocumentBuilder isn't finding what it needs.

Does anyone have any ideas on how I can find out where that function
is breaking?
Thank you

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