Package jp.aonir.fuzzyxml

Examples of jp.aonir.fuzzyxml.FuzzyXMLNode


  public static boolean isComment(FuzzyXMLNode node) {
    return unwrap(node) instanceof FuzzyXMLComment;
  }
 
  public static String getValue(FuzzyXMLNode node) {
    FuzzyXMLNode _node = unwrap(node);
    if (_node instanceof FuzzyXMLText) {
      return ((FuzzyXMLText)_node).getValue();
    }
    if (_node instanceof FuzzyXMLComment) {
      return ((FuzzyXMLComment)_node).getValue();
View Full Code Here


    }
    return "";
  }
 
  public static String getName(FuzzyXMLNode node) {
    FuzzyXMLNode _node = unwrap(node);
    if (_node instanceof FuzzyXMLElement) {
      return ((FuzzyXMLElement)_node).getName();
    }
    return "";
  }
View Full Code Here

    }
    return "";
  }
 
  public static boolean isWOTag(FuzzyXMLNode node) {
    FuzzyXMLNode _node = unwrap(node);
    return (_node instanceof FuzzyXMLElement && WodHtmlUtils.isWOTag(getName(_node).toLowerCase()));
  }
View Full Code Here

    FuzzyXMLNode _node = unwrap(node);
    return (_node instanceof FuzzyXMLElement && WodHtmlUtils.isWOTag(getName(_node).toLowerCase()));
  }
 
  public static boolean isDocumentRoot(FuzzyXMLNode node) {
    FuzzyXMLNode _node = unwrap(node);
    return (_node instanceof FuzzyXMLElement && _node.getParentNode() == null);
  }
View Full Code Here

    FuzzyXMLNode _node = unwrap(node);
    return (_node instanceof FuzzyXMLElement && _node.getParentNode() == null);
  }
 
  public static boolean hasChildren(FuzzyXMLNode node) {
    FuzzyXMLNode _node = unwrap(node);
    return (_node instanceof FuzzyXMLElement && ((FuzzyXMLElement)_node).hasChildren());
  }
View Full Code Here

    FuzzyXMLNode _node = unwrap(node);
    return (_node instanceof FuzzyXMLElement && ((FuzzyXMLElement)_node).hasChildren());
  }
   
  public static FuzzyXMLNode[] getChildren(FuzzyXMLNode node) {
    FuzzyXMLNode _node = unwrap(node);
    if (_node instanceof FuzzyXMLElement) {
      return ((FuzzyXMLElement)_node).getChildren();
    }
    return null;
  }
View Full Code Here

    }
    return false;
  }

  public boolean isSynthetic() {
    FuzzyXMLNode _node = unwrap(delegate);
    return _node.isSynthetic();
  }
View Full Code Here

    if (newChild instanceof FuzzyXMLAttribute || refChild instanceof FuzzyXMLAttribute) {
      return;
    }
    // �}���ʒu��T��
    FuzzyXMLNode[] children = getChildren();
    FuzzyXMLNode targetNode = null;
    boolean flag = false;
    for (int i = 0; i < children.length; i++) {
      if (flag) {
        targetNode = children[i];
      }
View Full Code Here

    // �A�g���r���[�g�̏ꍇ�͂Ȃɂ����Ȃ�
    if (newChild instanceof FuzzyXMLAttribute || refChild instanceof FuzzyXMLAttribute) {
      return;
    }
    // �}���ʒu��T��
    FuzzyXMLNode target = null;
    int index = -1;
    FuzzyXMLNode[] children = getChildren();
    for (int i = 0; i < children.length; i++) {
      if (children[i] == refChild) {
        target = children[i];
        index = i;
        break;
      }
    }
    if (target == null) {
      return;
    }
    int offset = target.getOffset();
    // �C�x���g�̔���
    fireModifyEvent(newChild.toXMLString(new RenderContext(getDocument().isHTML())), offset, 0);

    AbstractFuzzyXMLNode nodeImpl = (AbstractFuzzyXMLNode) newChild;
    nodeImpl.setParentNode(this);
View Full Code Here

      if (!element.getName().equals(getName())) {
        return false;
      }

      // �e������Ƃ�null��������true
      FuzzyXMLNode parent = element.getParentNode();
      if (parent == null) {
        if (getParentNode() == null) {
          return true;
        }
        return false;
View Full Code Here

TOP

Related Classes of jp.aonir.fuzzyxml.FuzzyXMLNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.