XMLs |
Provides facilities for dealing with XMLs-structured data. This format is used for transfering complex data types between various languages and systems in a simple, human-readable and editable way. This is similar to JSON and other text-based serialization systems but is easier to read/write and implement in a variety of ways. Refer to the BNMAPI documentation for a detailed description of the XMLs format and mnemonics available for implementation.
__/ REQUIREMENTS \__
ActionScript 3.0 (or later)
__/ IMPORTS \__
nothing
__/ EXTENDS \__
flash.xml.* flash.utils.ByteArray com.bnm.api.CoreData com.bnm.api.instances.ErrorBroadcast com.bnm.api.instances.Exception
__/ IMPLEMENTS \__
nothing
__/ NOTICE \__
©opyright 2008 Bay New Media. All rights, as stipulated in the The MIT License, are reserved.
This ActionScript library is licensed and released under the MIT License (http://www.opensource.org
Please visit http://www.baynewmedia.com/ or email con@baynewm edia.com for information, questions, concerns, or bug reports. tact
__/ NOTES \__
This class is commented using the NaturalDocs documentation system. It is intended to be easily read both from the direct source code and from an adaptation that is generated as hyperlinked HTML. The NaturalDocs specification used in this class’ documentation is version 1.35 though older versions may probably be used safely. For more information, please visit: http://www.naturaldocs.org/
The BNMAPI is officially available (primary sources) on Source Forge (http://sourceforge.net/projects/bnmapi/), on the Bay New Media site (http;//www.baynewmedia.com/), on the PeaBee project site (http://www.peabee.com/), and through the Bay New Media SVM repository server (visit http://www.baynewmedia.com/ for more information). Downloads from other sources may not be complete or up-to-date.
If you’re interested in joining the BNMAPI project in any capacity (development, testing, distribution, etc.), please visit us on Source Forge or the Bay New Media web site.
XMLs | Provides facilities for dealing with XMLs-structured data. |
Variables | |
XMLs_version | (String) A string version of the XMLs document version supported by this class. |
_dataObject | (Object) A generic object used to store deserialized data if not target is provided for this purpose. |
Functions and Properties | |
XMLs | The constructor method for the class. |
data | |
data | |
parseData | |
createDataFromNode | |
getDataTypeMnemonic | |
createString | |
createNumber | |
createInteger | |
createUnsigned | |
createBoolean | |
createObject | |
createXML | |
createMethod | |
createByte | |
getValue | |
getVariable | |
verifyXMLs |
private static var XMLs_version: String
(String) A string version of the XMLs document version supported by this class. This is used to compare the supplied XMLs version with this version to ensure compatibility. If the document does not specify a version, this version number is assigned and used though this is not recommended since compatibilty cannot be guaranteed.
public function XMLs( ...args )
The constructor method for the class.
... (untyped, optional): A number of parameters may be supplied directly to the constructor to avoid having to make extra method calls. Possible argument assignments include (in order): data (XML or XMLList, optional): The XMLs data to parse into this class instance. This is stored in the internal `data` reference unless a target is supplied. target (unyped, optional): A target into which to parse the data. If not supplied, the internal data reference is used instead. The target must be a dynamic type.
XMLs: A reference to the newly created class instance.
nothing
nothing
(String) A string version of the XMLs document version supported by this class.
private static var XMLs_version: String
(Object) A generic object used to store deserialized data if not target is provided for this purpose.
private var _dataObject: Object
The constructor method for the class.
public function XMLs( ...args )
public function get data():Object
private function parseData( xmlData: * ):void
private function createDataFromNode( nodeRef: *, parentObject: * ):void
private function getDataTypeMnemonic( mString: String ):String
private function createString( sourceXML: XML, targetObject: * )
private function createNumber( sourceXML: XML, targetObject: * )
private function createInteger( sourceXML: XML, targetObject: * )
private function createUnsigned( sourceXML: XML, targetObject: * )
private function createBoolean( sourceXML: XML, targetObject: * )
private function createObject( sourceXML: XML, targetObject: * ):Object
private function createXML( sourceXML: XML, targetObject: * )
private function createMethod( sourceXML: XML, targetObject: * )
private function createByte( sourceXML: XML, targetObject: * )
private function getValue( sourceXML: XML ):String
private function getVariable( sourceXML: XML, targetObject: * ):String
private function verifyXMLs( startNode: XML ):Boolean