Package com.dotcms.repackage.org.dom4j

Examples of com.dotcms.repackage.org.dom4j.Node


  public String attr(Object o) {
    if (o == null) {
      return null;
    }
    String key = String.valueOf(o);
    Node node = node();
    if (node instanceof Element) {
      return ((Element) node).attributeValue(key);
    }
    return null;
  }
View Full Code Here


  /**
   * Returns a {@link Map} of all attributes for the first/sole {@link Node} held internally by this instance. If that
   * Node is not an {@link Element}, this will return null.
   */
  public Map<String, String> attributes() {
    Node node = node();
    if (node instanceof Element) {
      Map<String, String> attrs = new HashMap<String, String>();
      for (Iterator i = ((Element) node).attributeIterator(); i.hasNext();) {
        Attribute a = (Attribute) i.next();
        attrs.put(a.getName(), a.getValue());
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.dom4j.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.