import { IPlugin } from "./i-plugin" ; import BasePlugin from "./base-plugin" ; import { AppletType } from "../type/applet-type" ; import { xmlTransForm } from "../xml/xml-transform" ; author CaMnter
  class XmlPlugin extends BasePlugin { private _$ : CheerioStatic | undefined ; constructor ( target , expect ) { super ( target , expect ) ; } run ( code ) { if ( ! code || '' === code ) { throw new Error ( `XmlPlugin # constructor #「code」error: ${ code }` ) ; } const { $ , bodyContent } = xmlTransForm ( code , this . _target , this . _expect ) ; this . _$ = $ ; this . _result = bodyContent ; return this . _result ; } get $ ( ) : CheerioStatic | undefined { return this . _$ ; } } export default XmlPlugin ;