XmlDom class deals with xml files. XML FORMAT USED FOR THE COMMUNICATION WITH FLASH, SERIALISATION, ETC. <object><property id=’var1’><string>aaaaaaaaaaa</string></property><property id=’var2’><string name=\”testName2\”>bbbbbbbbbb</string></property></object> <object><property id=”param2”><string>commandParam2</string></property><property id=”param1”><string>commandParam1</string></property></object> <string>stringCommandParam1</string> <object><property id=’success’><bool>false</bool></property><property id=’message’><string>Dummy error</string></property></object> DATA TYPES http://www.python.org/doc/2.4.4/lib/types.html Numeric types -- int, float, long Sequence Types -- str bool list, dict illegal characters < < > > & & ' ‘ “ “
lex@silex.tv
| org. | XmlDom class deals with xml files. |
| Variables | |
| silex_ptr | reference to silex main Api object (org.silex.core.Api) |
| XML_TAB_CHAR | TABS constant for XML files “\t” for easy read xml or “” for production mode |
| XML_CR_CHAR | CR constant for XML files “\n” for easy read xml or “” for production mode |
| version | Current silex xml version. |
| Functions | |
| XmlDom | Constructor. |
| xmlToSimplePath | convert xml string to an ActionScript object |
| doXmlToSimplePath | Recursive function which does the conversion from xml to object. |
| removeCDATA | Remove the <![CDATA[ ]]> from a string. |
| addCDATA | Add the <![CDATA[ ]]> to a string. |
| objToXml | Convert an object to xml. |
| doObjToXml | Convert an object to xml. |
| getType | Retrieve the type of an object. |
| escapeHTML | Escape a string to be outputed in an XML file |
| xmlToObj | convert xml string to an ActionScript object |
| doXmlToObj | Recursive function which does the conversion from xml to object. |
private function doObjToXml( objToConvert, tab: String, silexXmlVersion: String ):String
Convert an object to xml. Recursive function.
| param | objToConvert ActioinScript object |
| param | tab string containing tab characters to add at the beginning of the lines - XML formating |
| param | silexXmlVersion Current silex xml version |
The corresponding XML
reference to silex main Api object (org.silex.core.Api)
private var silex_ptr: org.silex.core.Api
TABS constant for XML files “\t” for easy read xml or “” for production mode
public static var XML_TAB_CHAR: String
CR constant for XML files “\n” for easy read xml or “” for production mode
public static var XML_CR_CHAR: String
Current silex xml version.
var version: Number
Constructor.
function XmlDom( api: org.silex.core.Api )
convert xml string to an ActionScript object
static function xmlToSimplePath( _xml: XML ):Object
Recursive function which does the conversion from xml to object.
private static function doXmlToSimplePath( elem: XMLNode ):Object
Remove the <![CDATA[ ]]> from a string.
public function removeCDATA( _str: String ):String
Add the <![CDATA[ ]]> to a string.
public function addCDATA( _str: String ):String
Convert an object to xml.
public function objToXml( objToConvert: Object ):String
Convert an object to xml.
private function doObjToXml( objToConvert, tab: String, silexXmlVersion: String ):String
Retrieve the type of an object.
private function getType( objToConvert: Object ):String
Escape a string to be outputed in an XML file
private function escapeHTML( _str: String ):String
convert xml string to an ActionScript object
public function xmlToObj( _xml: XML ):Object
Recursive function which does the conversion from xml to object.
private function doXmlToObj( elem: XMLNode, silexXmlVersion: Number ):Object