Library tutorials & articles
Simple DOM Access
Client Code
<script src="sda.js" language="javascript1.1" > </script>
The developer inserts a javascript tag and a function called load_data() The load_data function accesses the Simple DOM Access package allowing the developer to add nodes and associate attributes to the node element.
<script language="javascript1.1">
functionload_data() {
var oRootNode;
oRootNode=getSimpleDOMAccessDocument().selectSingleNode("/xml/node");
sda.addNode("root","A","1"); sda.setAttribute("A","message","Hello World");
/* sda.removeAttribute("A","message"); */ sda.addNode("A","AA","2"); sda.addNode("AA","AA1","3");
sda.addNode("AA","AA2","4"); sda.addNode("AA","AA3","5"); sda.addNode("A","AB","6");
sda.addNode("AB","AB1","7"); sda.addNode("AB","AB2","8"); sda.addNode("AB","AB3","9");
sda.addNode("root","B","10"); sda.addNode("B","BA1","11"); sda.addNode("B","BA2","12");
sda.addNode("B","BA3","13"); sda.addNode("B","BA4","14"); /* sda.deleteNode("AA3");
*/
sda.traverseTree(oRootNode);
}
</script>
<script language="javascript1.1"> load_data(); </script>
Related articles
Related discussion
-
vb6 generated help file not working in Window 7 and Vista
by Thushan Fernando (1 replies)
-
(Very urgent)how to assign the value of the variable in javascript function into php variable
by mazhar_qayyum (3 replies)
-
Postback data problem
by royal ludhiana (1 replies)
-
Problem Regarding .NET coding (Using Java Script,Ajax) Plz Plz Help me.
by boulou (0 replies)
-
Treeview with Ajax and xml
by lgmperera (0 replies)
Related podcasts
-
Ajax, DWR, and Spring
Improving the User Experience without the JavaScript hassle: Ajax, DWR, and Spring Buzzwords like AJAX (Asynchronous JavaScript And XML) and XmlHttpRequest are buzzing around Java blogs for months now. The DWR (Direct Web Remoting) project aims to provide easy AJAX for Java. This session will...
Events coming up
-
Nov
20
Full Frontal JavaScript Conference
Brighton, United Kingdom
A one day JavaScript conference held in Brighton, UK whose essence is to discuss JavaScript "with nothing concealed or held back".The conference is being held at one of the world's first cinemas, which first opened in 1910.Speakers include...
This thread is for discussions of Simple DOM Access.