Hi,

The cloneNode methon in the following minimal example works on java
1.6 but throws an DOMException with code 14 under android 5.

Code 14 according to sdk dok means:
"NAMESPACE_ERR
If an attempt is made to create or change an object in a way which is
incorrect with regard to namespaces."

Has anybody an idea why this might be?
Thank you in advance!

-------------------------------------------------------------------------------------------

public class M
{
        public static void main(String[] args)
        {
                try
                {
                    DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
                    DocumentBuilder builder = factory.newDocumentBuilder();

                    String text = new String("<blub></blub>");
                    Document document = builder.parse(new InputSource( new
StringReader(text) ));

                    document.getDocumentElement().cloneNode(true);
                }
                catch(DOMException e)
                {}
                catch(ParserConfigurationException e)
                {}
                catch(IOException e)
                {}
                catch(SAXException e)
                {}
        }
}
-------------------------------------------------------------------------------------------

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