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

You might also like...

Comments

About the author

David Nishimoto United States

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

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programs must be written for people to read, and only incidentally for machines to execute.”