Library tutorials & articles

Simple DOM Access

JavaScript functions

Below are the functions that will be made available by the sda javascript

function addNode(sParent_Key,sKey,sElementName)
* Add a node into the xml structure
* Rule 1 - sKey must be unique
* Rule 2 - sParent_Key must exist
functiongetNode(sKey)
* Locates a node in the xml structure by its unique "k
ey" value
functiontraverseTree
* Print the contents of the xml structure (nodes and attributes)
functionnext
* Returns the "key" of the next node
* Rule 1 - Return the descendant node if one exists
* Rule 2 - If no descendant node exists return the next sibling
* Rule 3 - Otherwise return the parent node's - sibling node
functionprevious
* Returns the "key" of the previous node
* Rule 1 - Find Sibling - Find the bottom-most child of the sibling
* Rule 2 - Return previous sibling
* Rule 3 - Return parent node child node.
functionsetAttribute(sKey,sAttribute_Name,sValue)
* Associate an attribute name/value to a "node" element
functionremoveAttribute(sKey,sAttribute_Name)
* Remove an attribute name from a "node" element
functiondeleteNode(sKey)
* Remove a "node" element matching a filtered "key" value
functiongetCurrentNodeKey()
* Return the current "key" value for the active node
* Used with next and previous methods
functionsetCurrentNodeKey
* Set the current key value
* Used with next and previous methods

Comments

  1. 01 Jan 1999 at 00:00

    This thread is for discussions of Simple DOM Access.

Leave a comment

Sign in or Join us (it's free).

David Nishimoto NishiSoft provides Part I of the Information Technology Project collaboration. Sign up and list your IT project tasks, assign task too friends, and get percent complete task. Part will include a wo...
AddThis

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...

Want to stay in touch with what's going on? Follow us on twitter!