// create child element
child_NumGp_SNO = doc.createElement("SNo");
child_NumGp.appendChild(child_NumGp_SNO);
String sno = String.valueOf(i+1);
Text txt = doc.createTextNode(sno);
// append child element
child_NumGp_SNO.appendChild(txt);
randint = r.nextInt(101);
System.out.print(randint + "\n");
child_NumGp_RAND = doc.createElement("Rand");
child_NumGp.appendChild(child_NumGp_RAND);
String randomint = String.valueOf(randint);
Text txt2 = doc.createTextNode(randomint);
child_NumGp_RAND.appendChild(txt2);
Above is part of Java code that will generate an output XML file that wil be feed by Serial Comm or Network Port to my earlier Line Graph program.
Monday
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment