Package org.w3c.dom

Examples of org.w3c.dom.Node


        getReplacedElementFactory().remove(e);
       
        if (e.hasChildNodes()) {
            NodeList children = e.getChildNodes();
            for (int i = 0; i < children.getLength(); i++) {
                Node child = children.item(i);
                if (child.getNodeType() == Node.ELEMENT_NODE) {
                    removeElementReferences((Element)child);
                }
            }
        }
    }
View Full Code Here


        }
        return true;
    }
   
    private Element findTable(Element cell) {
        Node n = cell.getParentNode();
        Element next;
        if (n.getNodeType() == Node.ELEMENT_NODE) {
            next = (Element)n;
            if (next.getNodeName().equals("tr")) {
                n = next.getParentNode();
                if (n.getNodeType() == Node.ELEMENT_NODE) {
                    next = (Element)n;
                    String name = next.getNodeName();
                    if (name.equals("table")) {
                        return next;
                    }
                   
                    if (name.equals("tbody") || name.equals("tfoot") || name.equals("thead")) {
                        n = next.getParentNode();
                        if (n.getNodeType() == Node.ELEMENT_NODE) {
                            next =(Element)n;
                            if (next.getNodeName().equals("table")) {
                                return next;
                            }
                        }
View Full Code Here

  private boolean isTextarea(Element e) {
      if (! e.getNodeName().equals("textarea")) {
          return false;
      }
     
      Node n = e.getFirstChild();
      while (n != null) {
          short nodeType = n.getNodeType();
          if (nodeType != Node.TEXT_NODE && nodeType != Node.CDATA_SECTION_NODE) {
              return false;
          }
      }
     
View Full Code Here

            throw new RuntimeException(e);
        }
    }
   
    private static Element getFirstChildElement(Element element) {
        Node n = element.getFirstChild();
        while (n != null) {
            if (n.getNodeType() == Node.ELEMENT_NODE) {
                return (Element)n;
            }
            n = n.getNextSibling();
        }
        return null;
    }
View Full Code Here

    DozerBuilder builder = new DozerBuilder();

    Element theRoot = document.getDocumentElement();
    NodeList nl = theRoot.getChildNodes();
    for (int i = 0; i < nl.getLength(); i++) {
      Node node = nl.item(i);
      if (node instanceof Element) {
        Element ele = (Element) node;
        log.debug("name: {}", ele.getNodeName());       
        if (CONFIGURATION_ELEMENT.equals(ele.getNodeName())) {
          parseConfiguration(ele, builder);
View Full Code Here

      MappingDirection direction = MappingDirection.valueOf(mappingDirection);
      definitionBuilder.type(direction);
    }
    NodeList nl = ele.getChildNodes();
    for (int i = 0; i < nl.getLength(); i++) {
      Node node = nl.item(i);
      if (node instanceof Element) {
        Element element = (Element) node;
        debugElement(element);
        if (CLASS_A_ELEMENT.equals(element.getNodeName())) {
          String typeName = getNodeValue(element);
View Full Code Here

      MappingDirection direction = MappingDirection.valueOf(mappingDirection);
      fieldMapBuilder.type(direction);
    }
    NodeList nodeList = ele.getChildNodes();
    for (int i = 0; i < nodeList.getLength(); i++) {
      Node node = nodeList.item(i);
      if (node instanceof Element) {
        Element element = (Element) node;
        debugElement(element);
        parseFieldElements(element, fieldMapBuilder);
      }
View Full Code Here

  private DozerBuilder.FieldMappingBuilder determineFieldMap(DozerBuilder.MappingBuilder definitionBuilder, Element ele) {
    DozerBuilder.FieldMappingBuilder fieldMapBuilder = definitionBuilder.field();

    NodeList nl = ele.getChildNodes();
    for (int i = 0; i < nl.getLength(); i++) {
      Node node = nl.item(i);
      if (node instanceof Element) {
        Element element = (Element) node;

        if (A_ELEMENT.equals(element.getNodeName())) {
          String name = getNodeValue(element);
View Full Code Here

      fieldMapBuilder.removeOrphans(BooleanUtils.toBoolean(getAttribute(ele, REMOVE_ORPHANS)));
    }

    NodeList nl = ele.getChildNodes();
    for (int i = 0; i < nl.getLength(); i++) {
      Node node = nl.item(i);
      if (node instanceof Element) {
        Element element = (Element) node;

        debugElement(element);
View Full Code Here

  private void parseConfiguration(Element ele, DozerBuilder builder) {
    DozerBuilder.ConfigurationBuilder configBuilder = builder.configuration();
    NodeList nl = ele.getChildNodes();
    for (int i = 0; i < nl.getLength(); i++) {
      Node node = nl.item(i);
      if (node instanceof Element) {
        Element element = (Element) node;

        debugElement(element);
View Full Code Here

TOP

Related Classes of org.w3c.dom.Node

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.