Welcome!

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

Reply
Trusted Contributor
tntn
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

 

code

 

 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");
		 Modifierdoc(itemes,"textField10","textField1","textField","textField0","textField2","textField3","textField4","textField5","textField6","textField7","textField8","textField9","textField11","textField12");
			
		
		 add(new RichTextField(root2.getNodeName()));
		 
		 
		Node r= root2.appendChild(root);
}
	

 

Please use plain text.