Exemple #1
0
  public RegexpDef(XmlNode xmlNode) {
    super(xmlNode, false);

    this.max = (String) xmlNode.get("max");
    this.replace = (String) xmlNode.get("replace");

    XmlNode regexpPatternDefNode = (XmlNode) xmlNode.get("regexp-pattern[0]");
    DefinitionResolver.validate(regexpPatternDefNode);
    regexpPatternDef =
        regexpPatternDefNode == null
            ? null
            : new BaseElementDef(regexpPatternDefNode, "regexp-pattern");

    XmlNode regexpSourceDefNode = (XmlNode) xmlNode.get("regexp-source[0]");
    DefinitionResolver.validate(regexpSourceDefNode);
    regexpSourceDef =
        regexpSourceDefNode == null
            ? null
            : new BaseElementDef(regexpSourceDefNode, "regexp-source");

    XmlNode regexpResultDefNode = (XmlNode) xmlNode.get("regexp-result[0]");
    DefinitionResolver.validate(regexpResultDefNode);
    regexpResultDef =
        regexpResultDefNode == null
            ? null
            : new BaseElementDef(regexpResultDefNode, "regexp-result");
  }
Exemple #2
0
  public TryDef(XmlNode xmlNode) {
    super(xmlNode, false);

    XmlNode tryBodyDefNode = (XmlNode) xmlNode.get("body[0]");
    DefinitionResolver.validate(tryBodyDefNode);
    this.tryBodyDef = tryBodyDefNode == null ? null : new BaseElementDef(tryBodyDefNode, "body");

    XmlNode catchValueDefNode = (XmlNode) xmlNode.get("catch[0]");
    DefinitionResolver.validate(catchValueDefNode);
    this.catchValueDef =
        catchValueDefNode == null ? null : new BaseElementDef(catchValueDefNode, "catch");
  }
  public HtmlToXmlDef(XmlNode xmlNode) {
    super(xmlNode);

    this.outputType = (String) xmlNode.get("outputtype");
    this.advancedXmlEscape = (String) xmlNode.get("advancedxmlescape");
    this.useCdataForScriptAndStyle = (String) xmlNode.get("usecdata");
    this.translateSpecialEntities = (String) xmlNode.get("specialentities");
    this.recognizeUnicodeChars = (String) xmlNode.get("unicodechars");
    this.omitUnknownTags = (String) xmlNode.get("omitunknowntags");
    this.treatUnknownTagsAsContent = (String) xmlNode.get("treatunknowntagsascontent");
    this.omitDeprecatedTags = (String) xmlNode.get("omitdeprtags");
    this.treatDeprecatedTagsAsContent = (String) xmlNode.get("treatdeprtagsascontent");
    this.omitComments = (String) xmlNode.get("omitcomments");
    this.omitHtmlEnvelope = (String) xmlNode.get("omithtmlenvelope");
    this.allowMultiWordAttributes = (String) xmlNode.get("allowmultiwordattributes");
    this.allowHtmlInsideAttributes = (String) xmlNode.get("allowhtmlinsideattributes");
    this.namespacesAware = (String) xmlNode.get("namespacesaware");
    this.prunetags = (String) xmlNode.get("prunetags");
  }