Class cc.SAXParser

Class Summary
Constructor Attributes Constructor Name and Description
 
a SAX Parser

Method Summary

Class Detail

cc.SAXParser()
a SAX Parser

Method Detail

  • {String} getExt(filePath)
    get file extension name from filepath
    Parameters:
    {String} filePath
    Returns:
    {String}
  • <static> {cc.SAXParser} cc.SAXParser.getInstance()
    get a singleton SAX parser
    Returns:
    {cc.SAXParser}
  • {String} getList(key)
    get value by key from xmlList
    Parameters:
    {String} key
    Returns:
    {String} xml content
  • {String} getName(filePath)
    get filename from filepath
    Parameters:
    {String} filePath
    Returns:
    {String}
  • {Array} parse(textxml)
    parse a xml from a string (xmlhttpObj.responseText)
    Parameters:
    {String} textxml
    plist xml contents
    Returns:
    {Array} plist object array
  • preloadPlist(filePath)
    Preload plist file
    Parameters:
    {String} filePath
  • {Document} tmxParse(textxml, isXMLString)
    parse a tilemap xml from a string (xmlhttpObj.responseText)
    Parameters:
    {String} textxml
    tilemap xml content
    isXMLString
    Returns:
    {Document} xml document
  • unloadPlist(filePath)
    Unload the preloaded plist from xmlList
    Parameters:
    {String} filePath