/**
 * 解析  xml
 */ export class SaxParse { protected _parser : DOMParser | null ; constructor ( ) { if ( window . DOMParser ) { this . _parser = new DOMParser ( ) ; } else { this . _parser = null ; } } param textxml returns public parse ( textxml ) { return this . _parseXML ( textxml ) ; } protected _parseXML ( textxml ) { var xmlDoc ; if ( this . _parser ) { xmlDoc = this . _parser . parseFromString ( textxml , "text/xml" ) ; } else { xmlDoc = new ActiveXObject ( "Microsoft.XMLDOM" ) ; xmlDoc . async = "false" ; xmlDoc . loadXML ( textxml ) ; } return xmlDoc . documentElement ; } }