Пример #1
0
  public boolean visit(ConditionalExpression s) throws Exception {
    Map<String, String> parameters = createInitialParameters(s);
    xmlWriter.startTag("ConditionalExpression", parameters);

    xmlWriter.startTag("Condition", new HashMap<String, String>());
    s.getCondition().traverse(this);
    xmlWriter.endTag("Condition");

    Expression ifTrue = s.getIfTrue();
    if (ifTrue != null) {
      xmlWriter.startTag("IfTrue", new HashMap<String, String>());
      ifTrue.traverse(this);
      xmlWriter.endTag("IfTrue");
    }

    Expression falseExp = s.getIfFalse();
    if (falseExp != null) {
      xmlWriter.startTag("IfFalse", new HashMap<String, String>());
      falseExp.traverse(this);
      xmlWriter.endTag("IfFalse");
    }

    return false;
  }