Oct 14, 2003 #1 devendrap Programmer Aug 22, 2001 50 US Hi, I am very new to JSP. Can you please let me know, How can we add/delete XML file records using JSP in Unix machine? Thanks, Dave
Hi, I am very new to JSP. Can you please let me know, How can we add/delete XML file records using JSP in Unix machine? Thanks, Dave
Oct 14, 2003 1 #2 sedj Programmer Aug 6, 2002 5,610 Do you mean delete the xml files on a server, or edit the actual <elements> ? If the first, use some embedded Java code - Code: new File("myfile.xml").delete(); . If the second, you need to look at a DOM and SAX API - http://java.sun.com/xml/jaxp/dist/1.1/docs/api/org/w3c/dom/package-summary.html You will then be able to parse the XML, and then build a DOM from it, and manipulate it from there. Upvote 0 Downvote
Do you mean delete the xml files on a server, or edit the actual <elements> ? If the first, use some embedded Java code - Code: new File("myfile.xml").delete(); . If the second, you need to look at a DOM and SAX API - http://java.sun.com/xml/jaxp/dist/1.1/docs/api/org/w3c/dom/package-summary.html You will then be able to parse the XML, and then build a DOM from it, and manipulate it from there.
Oct 14, 2003 Thread starter #3 devendrap Programmer Aug 22, 2001 50 US I mean to say, XML elements Upvote 0 Downvote
Oct 14, 2003 #4 sedj Programmer Aug 6, 2002 5,610 you need to look at a DOM and SAX API - http://java.sun.com/xml/jaxp/dist/1.1/docs/api/org/w3c/... You will then be able to parse the XML, and then build a DOM from it, and manipulate it from there. The Sun tutorial for JAXP will give you some examples of how to parse XML documents using Java .. http://java.sun.com/webservices/docs/1.2/tutorial/doc/index.html Upvote 0 Downvote
you need to look at a DOM and SAX API - http://java.sun.com/xml/jaxp/dist/1.1/docs/api/org/w3c/... You will then be able to parse the XML, and then build a DOM from it, and manipulate it from there. The Sun tutorial for JAXP will give you some examples of how to parse XML documents using Java .. http://java.sun.com/webservices/docs/1.2/tutorial/doc/index.html