List of utility methods to do XML Attribute Add
void | addOptionalPropertyReference(BeanDefinitionBuilder builder, String propertyName, Attr attribute, String defaultValue) Convenience method delegating to #addProperty(BeanDefinitionBuilder,String,String,String,boolean,boolean) . addProperty(builder, propertyName, attribute.getValue(), defaultValue, false, true); |
void | addOrUpdateAttribute(Element element, String name, String value) Update an attribute for an Element with the provided value. NamedNodeMap measureAttrs = element.getAttributes(); Node attrNode = measureAttrs.getNamedItem(name); if (attrNode != null) { attrNode.setNodeValue(value); } else { element.setAttribute(name, value); |
void | addPropertyReferenceIfNeeded(BeanDefinitionBuilder bdb, Element element, String attributeName) Add property reference to BeanDefinitionBuilder if needed, following the naming Conventions if (element.hasAttribute(attributeName))
bdb.addPropertyReference(Conventions.attributeNameToPropertyName(attributeName),
element.getAttribute(attributeName));
|
void | addRequiredPropertyValue(BeanDefinitionBuilder builder, String propertyName, Element element, String attributeName) Convenience method delegating to #addProperty(BeanDefinitionBuilder,String,String,String,boolean,boolean) . addProperty(builder, propertyName, element.getAttribute(attributeName), null, true, false); |
Element | addTextElement(Node parent, String name, String value, Attr[] attrs) add Text Element Element element; if (parent instanceof Document) { element = ((Document) parent).createElement(name); } else { element = parent.getOwnerDocument().createElement(name); if (attrs != null && attrs.length > 0) { for (Attr attr : attrs) { ... |
void | addTypeAttribute(Element element, String type) Adds a type attribute to an element as required by the RPC/Encoded binding. if (type != null) { element.setAttribute("xsi:type", type); |
double | readDoubleAttr(Element element, String attributeName, double defaultValue) read Double Attr String attributeValue = element.getAttribute(attributeName); try { return Double.parseDouble(attributeValue); } catch (NumberFormatException e) { return defaultValue; |