Returns the attribute handler for the given attribute.<p>

@param attributeName the attribute name
@param parentPathElements the parent path elements

@return the attribute handler
197862
private CmsAttributeHandler getAttributeHandler(String attributeName, List<String> parentPathElements) {

        List<String> childPathElements = new ArrayList<String>(parentPathElements);
        childPathElements.add(attributeName);
        CmsAttributeHandler handler = getRootAttributeHandler().getHandlerByPath(
            childPathElements.toArray(new String[childPathElements.size()]));
        return handler;
    }
252908
@Override
    public Object getAttribute(final String name) {
        return ProfileHelper.getInternalAttributeHandler().restore(this.attributes.get(name));
    }
1153359
private LayoutElement parseElement(Element node, LayoutElement parent) {
        LayoutElement layoutElement = newLayoutElement(node, parent, null);
        parseChildren(node, layoutElement, Tag.ELEMENT, Tag.TRIGGER);
        return layoutElement;
    }
277068
public Object getAttribute(String attributeName) {

        if (m_attributeMap == null) {
            return null;
        }
        return m_attributeMap.get(attributeName);
    }
15072
private static Element handleNode(Element parent, String xpathName) {

        // if node is no attribute, create a new node
        String childrenPart = null;
        String nodeName;
        int pos = xpathName.indexOf("[");
        if (pos > 0) {
            childrenPart = xpathName.substring(pos + 1, xpathName.length() - 1);
            nodeName = xpathName.substring(0, pos);
        } else {
            nodeName = xpathName;
        }
        // create node
        Element elem = parent.addElement(nodeName);
        if (childrenPart != null) {
            pos = childrenPart.indexOf("[");
            if ((pos > 0) && (childrenPart.indexOf("]") > pos)) {
                handleNode(elem, childrenPart);
                return elem;
            }
            if (childrenPart.contains("=")) {
                Map<String, String> children = CmsStringUtil.splitAsMap(childrenPart, "][", "=");
                // handle child nodes
                for (Map.Entry<String, String> child : children.entrySet()) {
                    String childName = child.getKey();
                    String childValue = child.getValue();
                    if (childValue.startsWith("'")) {
                        childValue = childValue.substring(1);
                    }
                    if (childValue.endsWith("'")) {
                        childValue = childValue.substring(0, childValue.length() - 1);
                    }
                    if (childName.startsWith("@")) {
                        elem.addAttribute(childName.substring(1), childValue);
                    } else if (childName.equals("text()")) {
                        elem.setText(childValue);
                    } else if (!childName.contains("(")) {
                        Element childElem = elem.addElement(childName);
                        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(childValue)) {
                            childElem.addText(childValue);
                        }
                    }
                }
            }
        }
        return elem;
    }
1128081
private String[] getPathElements(CmsXmlContent content, I_CmsXmlContentValue value) {

        List<String> pathElements = new ArrayList<String>();
        String[] paths = value.getPath().split("/");
        String path = "";
        for (int i = 0; i < paths.length; i++) {
            path += paths[i];
            I_CmsXmlContentValue ancestor = content.getValue(path, value.getLocale());
            int valueIndex = ancestor.getXmlIndex();
            if (ancestor.isChoiceOption()) {
                Element parent = ancestor.getElement().getParent();
                valueIndex = parent.indexOf(ancestor.getElement());
            }
            String pathElement = getAttributeName(ancestor);
            pathElements.add(pathElement + "[" + valueIndex + "]");
            if (ancestor.isChoiceType()) {
                pathElements.add("ATTRIBUTE_CHOICE");
            }
            path += "/";
        }
        return pathElements.toArray(new String[pathElements.size()]);
    }
1006476
public static boolean getAttributeAsBoolean(XmlPullParser parser, String attributeName, boolean defaultValue) throws Exception {
		// parser.getText()
		String value = parser.getAttributeValue(null, attributeName);

		if (!StringUtils.hasText(value)) {
			return defaultValue;
		}

		return Boolean.parseBoolean(value);
	}
1359453
public static String getAttrVal(final Element el, final String name)
      throws SAXException {
    Attr at = el.getAttributeNode(name);
    if (at == null) {
      return null;
    }

    return at.getValue();
  }
495696
private Element getChildElement(Element parent) {
	NodeList list = parent.getChildNodes();
	int len = list.getLength();
	for (int i = 0; i < len; i++) {
	    Node node = list.item(i);
	    if (node instanceof Element) {
		return (Element) node;
	    }
	}
	return null;
    }
1226375
public AttributeBuilder allowAttributes(String... attributeNames) {
    ImmutableList.Builder<String> b = ImmutableList.builder();
    for (String attributeName : attributeNames) {
      b.add(HtmlLexer.canonicalName(attributeName));
    }
    return new AttributeBuilder(b.build());
  }
1082087
public static ElementSelector byNameAndAttributes(final QName... attribs) {
        if (attribs == null) {
            throw new IllegalArgumentException(ATTRIBUTES_MUST_NOT_BE_NULL);
        }
        final Collection<QName> qs = Arrays.asList(attribs);
        if (any(qs, new IsNullPredicate())) {
            throw new IllegalArgumentException(ATTRIBUTES_MUST_NOT_CONTAIN_NULL_VALUES);
        }
        return new ElementSelector() {
            @Override
            public boolean canBeCompared(Element controlElement,
                                         Element testElement) {
                if (!byName.canBeCompared(controlElement, testElement)) {
                    return false;
                }
                return mapsEqualForKeys(Nodes.getAttributes(controlElement),
                                        Nodes.getAttributes(testElement),
                                        qs);
            }
        };
    }
868003
public Attribute getChild(String attrName) {
    Iterable<Attribute> attrParts = getEntities(CHILDREN, Attribute.class);
    return Streams.stream(attrParts)
        .filter(attrPart -> attrPart.getName().equals(attrName))
        .findFirst()
        .orElse(null);
  }
334763
def get_element_attributes(parent_to_parse, element_path=None):
    

    element = get_element(parent_to_parse, element_path)

    return {} if element is None else element.attrib
468372
public void callChildVisitors(XSLTVisitor visitor, boolean callAttributes)
  {
  	if(callAttributes && (null != m_selectExpression))
  		m_selectExpression.callVisitors(this, visitor);
  		
    int length = getSortElemCount();

    for (int i = 0; i < length; i++)
    {
      getSortElem(i).callVisitors(visitor);
    }

    super.callChildVisitors(visitor, callAttributes);
  }
1172689
public String getPrincipalAttributeValue(final Principal p, final String attributeName) {
        val attributes = p.getAttributes();
        if (attributes.containsKey(attributeName)) {
            return CollectionUtils.toCollection(attributes.get(attributeName)).iterator().next().toString();
        }
        return null;
    }
1256807
private Attributes getAttributes(StartElement event)
    {
        AttributesImpl attrs = new AttributesImpl();

        if (!event.isStartElement()) {
            throw new InternalError("getAttributes() attempting to process: " + event);
        }

        // Add namspace declarations if required
        if (this.filter.getNamespacePrefixes()) {
            for (@SuppressWarnings("unchecked") Iterator<Namespace> i = event.getNamespaces(); i.hasNext();) {
                Namespace staxNamespace = i.next();
                String uri = staxNamespace.getNamespaceURI();
                if (uri == null) {
                    uri = "";
                }

                String prefix = staxNamespace.getPrefix();
                if (prefix == null) {
                    prefix = "";
                }

                String qName = "xmlns";
                if (prefix.length() == 0) {
                    prefix = qName;
                } else {
                    qName = qName + ':' + prefix;
                }
                attrs.addAttribute("http://www.w3.org/2000/xmlns/", prefix, qName, "CDATA", uri);
            }
        }

        // gather non-namespace attrs
        for (@SuppressWarnings("unchecked") Iterator<Attribute> i = event.getAttributes(); i.hasNext();) {
            Attribute staxAttr = i.next();

            String uri = staxAttr.getName().getNamespaceURI();
            if (uri == null) {
                uri = "";
            }
            String localName = staxAttr.getName().getLocalPart();
            String prefix = staxAttr.getName().getPrefix();
            String qName;
            if (prefix == null || prefix.length() == 0) {
                qName = localName;
            } else {
                qName = prefix + ':' + localName;
            }
            String type = staxAttr.getDTDType();
            String value = staxAttr.getValue();

            attrs.addAttribute(uri, localName, qName, type, value);
        }

        return attrs;
    }
254984
protected String getElementName(String attributeName) {

        if (attributeName.contains("/")) {
            return attributeName.substring(attributeName.lastIndexOf("/") + 1);
        }
        return attributeName;
    }