Parses XML to values in an object and handles methods for simple retrieval of these values
| com. | Parses XML to values in an object and handles methods for simple retrieval of these values |
| Variables | |
| m_Values | |
| Functions | |
| XmlParser | The constructor, retrives an XMLNode, sets up the toplevel object and starts parsing the xml |
| recursiveXmlLoop | Recursive looping and parsiing of XML, parses the attributes first if available, proceeds with the elements, if any sub elements the function calls itself repeditly |
| getAttributes | Reads all the attributes of an XML, if attribute is empty it is omitted |
| GetValue | Looks up the internal getValueByName method and return its values |
| getValueByName | recursive function that loops the m_Values object looking for textual matches, and returns all possible |
| hasAttribute | attempts to iterate the XMLNode’s attributes, returns true if there are any attributes to iterate |
private function recursiveXmlLoop( p_xmlnode: XMLNode, p_valueobject: Object ) : Void
Recursive looping and parsiing of XML, parses the attributes first if available, proceeds with the elements, if any sub elements the function calls itself repeditly
| p_xmlnode | :XMLNode - the xmlnode to parse |
| p_valueobject | :Object - the Object at the correct point where you wuuld like to insert the parsed values |
Void
private function getAttributes( p_xmlnode: XMLNode, p_valueobject: Object ) : Object
Reads all the attributes of an XML, if attribute is empty it is omitted
| p_xmlnode | :XMLNode - the xmlnode to parse |
| p_valueobject | :Object - the Object at the correct point where you would like to insert the parsed values |
Object - the object (or associative array if you will ) where the values are inserted
private function getValueByName( p_name: String, p_valueobject: Object )
recursive function that loops the m_Values object looking for textual matches, and returns all possible
| p_name | :String - the name of the prop to return |
| p_valueobject | :Object - the object you are inspecting |
string, null or Object depending if one, zero or multiple items are found
private var m_Values: Object
The constructor, retrives an XMLNode, sets up the toplevel object and starts parsing the xml
public function XmlParser( p_xml: XMLNode )
Recursive looping and parsiing of XML, parses the attributes first if available, proceeds with the elements, if any sub elements the function calls itself repeditly
private function recursiveXmlLoop( p_xmlnode: XMLNode, p_valueobject: Object ) : Void
Reads all the attributes of an XML, if attribute is empty it is omitted
private function getAttributes( p_xmlnode: XMLNode, p_valueobject: Object ) : Object
Looks up the internal getValueByName method and return its values
public function GetValue( p_name: String )
recursive function that loops the m_Values object looking for textual matches, and returns all possible
private function getValueByName( p_name: String, p_valueobject: Object )
attempts to iterate the XMLNode’s attributes, returns true if there are any attributes to iterate
public function hasAttribute( p_context: XMLNode )