# Uses of Class
com.norconex.commons.lang.xml.Xml

Packages that use Xml
Package
Description
com.norconex.commons.lang.config
Classes making it easier to deal with configuration files.
com.norconex.commons.lang.map
Enhanced and/or useful features related to Map.
com.norconex.commons.lang.xml
XML-related classes.
com.norconex.commons.lang.xml.flow
Classes offering basic flow-processing to XML.
com.norconex.commons.lang.xml.flow.impl
Various XML flow element implementations.

- ## Uses of Xml in com.norconex.commons.lang.config

  Methods in com.norconex.commons.lang.config that return Xml
  Modifier and Type
  Method
  Description
  `Xml`
  ConfigurationLoader.`loadXML(Path configFile)`
  Deprecated.
  Use `ConfigurationLoader.toXml(Path)` instead.
  `Xml`
  ConfigurationLoader.`loadXML(Path configFile, ErrorHandler errorHandler)`
  Deprecated.
  Use `ConfigurationLoader.toXml(Path, ErrorHandler)` instead.
  `Xml`
  ConfigurationLoader.`toXml(Path configFile)`
  Loads an XML configuration file into an `Xml` object, performing variable interpolation and handling any other Velocity directives.
  `Xml`
  ConfigurationLoader.`toXml(Path configFile, ErrorHandler errorHandler)`
  Loads an XML configuration file into an `Xml` object, performing variable interpolation and handling any other Velocity directives.

- ## Uses of Xml in com.norconex.commons.lang.map

  Methods in com.norconex.commons.lang.map with parameters of type Xml
  Modifier and Type
  Method
  Description
  `static PropertySetter`
  PropertySetter.`fromXML(Xml xml, PropertySetter defaultValue)`
  `static void`
  PropertySetter.`toXML(Xml xml, PropertySetter setter)`

- ## Uses of Xml in com.norconex.commons.lang.xml

  Methods in com.norconex.commons.lang.xml that return Xml
  Modifier and Type
  Method
  Description
  `Xml`
  Xml.`addDelimitedElementList(String name, String delim, List<?> values)`
  Adds a list of values as a new element after joining them with the given delimiter.
  `Xml`
  Xml.`addDelimitedElementList(String name, List<?> values)`
  Adds a list of values as a new element after joining them with a comma (CSV).
  `Xml`
  Xml.`addElement(String tagName)`
  Adds an empty child element to this XML root element.
  `Xml`
  Xml.`addElement(String tagName, Object value)`
  Adds a child element to this XML root element.
  `Xml`
  Xml.`addElementList(@NonNull String parentTagName, String tagName, List<?> values)`
  Adds a list of values under a new parent tag name to the current XML and return the added list.
  `Xml`
  Xml.`addElementMap(String parentTagName, String tagName, String attributeName, Map<?,?> map)`
  Adds a `Map` as a series of elements with a parent element wrapping that group.
  `Xml`
  Xml.`addXML(Xml xml)`
  `Xml`
  Xml.`addXML(Reader xml)`
  `Xml`
  Xml.`addXML(String xml)`
  `Xml`
  Xml.`clear()`
  Clears this XML by removing all its attributes and elements (i.e., making it an empty tag).
  `Xml`
  Xml.`computeElementIfAbsent(String tagName, Function<String,Object> function)`
  Computes and adds the element returned by the provided function if an element with the same name is not already present, else, return the existing one.
  `Xml`
  Xml.Builder.`create()`
  `Xml`
  XmlValidationException.`getXml()`
  `Xml`
  Xml.`getXML(String xpathExpression)`
  Gets the xml subset matching the xpath expression.
  `Xml`
  Xml.`insertAfter(Xml newXML)`
  Inserts a new XML node after this one, as a sibling of a shared parent.
  `Xml`
  Xml.`insertBefore(Xml newXML)`
  Inserts a new XML node before this one, as a sibling of a shared parent.
  `Xml`
  XmlCursor.`readAsXML()`
  `Xml`
  Xml.`remove()`
  Removes itself from its XML parent (if any).
  `Xml`
  Xml.`removeAttribute(String name)`
  Removes an attribute on this XML element.
  `Xml`
  Xml.`removeElement(String tagName)`
  Removes an element from this XML.
  `Xml`
  Xml.`removeTextContent()`
  Removes this XML direct text content, without impact on attributes and child elements and their content.
  `Xml`
  Xml.`rename(String newName)`
  Rename this XML (element tag name).
  `Xml`
  Xml.`replace(Xml replacement)`
  Replaces the current XML with the provided one.
  `Xml`
  Xml.`setAttribute(String name, Object value)`
  Sets an attribute on this XML element, converting the supplied object to a string (enums are also converted to lowercase).
  `Xml`
  Xml.`setAttributes(Map<String,?> attribs)`
  Sets attributes on this XML element.
  `Xml`
  Xml.`setDelimitedAttributeList(String name, String delim, List<?> values)`
  Sets a list of values as an attribute after joining them with the given delimiter.
  `Xml`
  Xml.`setDelimitedAttributeList(String name, List<?> values)`
  Sets a list of values as an attribute after joining them with a comma (CSV).
  `Xml`
  Xml.`setTextContent(Object textContent)`
  Sets the direct text content of an XML element.
  `Xml`
  Xml.`unwrap()`
  Unwraps this XML by removing the root tag and keeping its child element (and its nested element).
  `Xml`
  Xml.`wrap(String parentName)`
  Wraps this XML by adding a parent element around it.
  Methods in com.norconex.commons.lang.xml that return types with arguments of type Xml
  Modifier and Type
  Method
  Description
  `List<Xml>`
  Xml.`addElementList(String tagName, List<?> values)`
  Adds a list of values to the current XML and return the added list.
  `List<Xml>`
  Xml.`addElementMap(String tagName, String attributeName, Map<?,?> map)`
  Adds a `Map` as a series of elements without a parent element wrapping that group.
  `List<Xml>`
  Xml.`getXMLList(String xpathExpression)`
  Gets the XML subsets matching the xpath expression.
  Methods in com.norconex.commons.lang.xml with parameters of type Xml
  Modifier and Type
  Method
  Description
  `Xml`
  Xml.`addXML(Xml xml)`
  `String`
  XmlFormatter.`format(Xml xml)`
  `Xml`
  Xml.`insertAfter(Xml newXML)`
  Inserts a new XML node after this one, as a sibling of a shared parent.
  `Xml`
  Xml.`insertBefore(Xml newXML)`
  Inserts a new XML node before this one, as a sibling of a shared parent.
  `void`
  XmlConfigurable.`loadFromXML(Xml xml)`
  Load XML configuration values and initialized this object with them.
  `Xml`
  Xml.`replace(Xml replacement)`
  Replaces the current XML with the provided one.
  `void`
  XmlConfigurable.`saveToXML(Xml xml)`
  Saves this object as XML.
  Method parameters in com.norconex.commons.lang.xml with type arguments of type Xml
  Modifier and Type
  Method
  Description
  `void`
  Xml.`forEach(String xpathExpression, Consumer<Xml> action)`
  If the given expression matches one or more elements, consume those element one by one.
  `void`
  Xml.`ifXML(String xpathExpression, Consumer<Xml> then)`
  If the given expression matches an element, consume that element.
  `<T> T`
  Xml.`parseXML(String xpathExpression, @NonNull Function<Xml,T> parser)`
  `<T> T`
  Xml.`parseXML(String xpathExpression, @NonNull Function<Xml,T> parser, T defaultValue)`
  `<T> List<T>`
  Xml.`parseXMLList(String xpathExpression, @NonNull Function<Xml,T> parser)`
  `<T> List<T>`
  Xml.`parseXMLList(String xpathExpression, @NonNull Function<Xml,T> parser, List<T> defaultValue)`
  `<K, V> Map<K,V>`
  Xml.`parseXMLMap(String xpathExpression, Function<Xml,Map.Entry<K,V>> parser)`
  `<K, V> Map<K,V>`
  Xml.`parseXMLMap(String xpathExpression, Function<Xml,Map.Entry<K,V>> parser, Map<K,V> defaultValue)`
  Constructors in com.norconex.commons.lang.xml with parameters of type Xml
  Modifier
  Constructor
  Description
  ``
  `XmlValidationException(List<XmlValidationError> errors, Xml xml)`
  Constructor.

- ## Uses of Xml in com.norconex.commons.lang.xml.flow

  Methods in com.norconex.commons.lang.xml.flow with parameters of type Xml
  Modifier and Type
  Method
  Description
  `Consumer<T>`
  XmlFlow.`parse(Xml xml)`
  `void`
  XmlFlow.`write(Xml xml, Consumer<T> consumer)`
  Writes a flow previously constructed by `XmlFlow.parse(Xml)` to XML.

- ## Uses of Xml in com.norconex.commons.lang.xml.flow.impl

  Methods in com.norconex.commons.lang.xml.flow.impl with parameters of type Xml
  Modifier and Type
  Method
  Description
  `void`
  PropertyMatcherCondition.`loadFromXML(Xml xml)`
  `void`
  PropertyMatcherCondition.`saveToXML(Xml xml)`