Package soundtrap.xml
Class SoundTrapXMLTools
java.lang.Object
soundtrap.xml.SoundTrapXMLTools
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic StringfindAttribute(Node node, String attribute) Get a named attribute from a node.static StringfindChildAttribute(Node node, String childName, String attribute) Get an String value for the given attribute of a named child nodestatic NodefindChildNode(Node node, String childName) Find a child node by namestatic StringfindChildValue(Node node, String childName) Get the string value of a child nodestatic IntegerfindIntegerAttribute(Node node, String attribute) Get a named attribute from a node.static IntegerfindIntegerChildAttribute(Node node, String childName, String attribute) Get an Integer value for the given attribute of a named child nodestatic IntegerfindIntegerChildValue(Node node, String childName) Get the Integer value of a child nodestatic NodefindNodeById(NodeList nodes, int id) Find a node by it's IDstatic NodefindNodeById(NodeList nodes, String id) Find a node by it's IDstatic NodefindNodeByProc(NodeList nodes, String procName) Find a node with a given PROC name.static NodefindNodeWithChildValue(NodeList nodes, String childName, String childValue) Find a node which has a child with a given name with that child having a given valuestatic IntegerfindSourceSampleRate(NodeList cfgNodes, Node node) Find the source sample rate for a node. 
- 
Constructor Details
- 
SoundTrapXMLTools
public SoundTrapXMLTools() 
 - 
 - 
Method Details
- 
findSourceSampleRate
Find the source sample rate for a node.This function iterates back through the source list until if finds something with a sample rate or returns null.
- Parameters:
 node- starting node.- Returns:
 - sample rate or null
 
 - 
findChildValue
Get the string value of a child node- Parameters:
 node- parent nodechildName- child name- Returns:
 - String value or null
 
 - 
findIntegerChildValue
Get the Integer value of a child node- Parameters:
 node- parent nodechildName- child name- Returns:
 - Integer value or null
 
 - 
findIntegerChildAttribute
Get an Integer value for the given attribute of a named child node- Parameters:
 node- parent nodechildName- child node nameattribute- attribute name- Returns:
 - Integer value or null
 
 - 
findChildAttribute
Get an String value for the given attribute of a named child node- Parameters:
 node- parent nodechildName- child node nameattribute- attribute name- Returns:
 - String value or null
 
 - 
findIntegerAttribute
Get a named attribute from a node.- Parameters:
 node- parent nodeattribute- attribute name- Returns:
 - Integer value or null
 
 - 
findAttribute
Get a named attribute from a node.- Parameters:
 node- parent nodeattribute- attribute name- Returns:
 - String value or null
 
 - 
findChildNode
Find a child node by name- Parameters:
 node- parent nodechildName- child node name- Returns:
 - Child node or null
 
 - 
findNodeById
Find a node by it's ID- Parameters:
 nodes- node listid- id to search for- Returns:
 - found node or null.
 
 - 
findNodeById
Find a node by it's ID- Parameters:
 nodes- node listid- id to search for- Returns:
 - found node or null.
 
 - 
findNodeByProc
Find a node with a given PROC name.- Parameters:
 nodes- node listprocName- PROC name- Returns:
 - a node or null.
 
 - 
findNodeWithChildValue
Find a node which has a child with a given name with that child having a given value- Parameters:
 nodes- node listchildName- child namechildValue- child value.- Returns:
 - found node or null
 
 
 -