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

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

  • Dec 8

    December Silicon Valley Ruby Meetup

    Moffett Field, United States

    In a World of Middleware, Who Needs Monolithic Applications? by Jon Crosby With Rack emerging as the standard for composing web applications and services, most recently with Rails adoption, an architectural shift is taking place. Learn how to create next generation web services by reusing existing Rack middleware and supplementing with your own components and micro-frameworks like Sinatra. Bio : Jon likes music, the Open Web, Ruby, Erlang, Haskell, Objective-C, JavaScript and coffee.

We'd love to hear what you think! Submit ideas or give us feedback