Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Trusted Contributor
Posts: 102
Registered: ‎03-01-2010
My Device: 8310
My Carrier: Ingenieur

jvm error 104 uncaught: DOMException

hi evry body


i need a help iwant to apend child to an element root of document xml but it give me this error:

jvm error 104 uncaught: DOMException


i read the first xml document and i modify in it and i want to append the root of this document to another document xml




 XMLDemoScreen() throws IOException, Exception 
    	Document document;
    Document document2;
		String	url="file:///SDCard/BlackBerry/inter.xml";
		StreamConnection	conn = (StreamConnection) Connector.open(url);
		DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance();
		DocumentBuilder docBui = null;
			docBui = docFac.newDocumentBuilder();
			document = docBui.parse(conn.openInputStream());
		Element root = document.getDocumentElement();
       setTitle( new LabelField( "XML Demo") );
		String	url2="file:///SDCard/BlackBerry/documents.xml";
		StreamConnection	conn2 = (StreamConnection) Connector.open(url2);
		DocumentBuilderFactory docFac2 = DocumentBuilderFactory.newInstance();
		DocumentBuilder docBui2 = null;
			docBui2 = docFac2.newDocumentBuilder();
			document2 = docBui2.parse(conn2.openInputStream());
		Element root2 = document2.getDocumentElement();
		NodeList itemes=root.getElementsByTagName("item");
		 add(new RichTextField(root2.getNodeName()));
		Node r= root2.appendChild(root);