public final class XmlElement extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
XmlElement.Builder
Builder for
XmlElement. |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
attributes()
Retrieves the attributes associated with the element
|
static XmlElement.Builder |
builder() |
List<XmlElement> |
children() |
String |
elementName() |
static XmlElement |
empty() |
XmlElement |
getElementByName(String tagName)
Retrieves a single child element by tag name.
|
List<XmlElement> |
getElementsByName(String tagName)
Get all child elements by the given tag name.
|
XmlElement |
getFirstChild() |
Optional<String> |
getOptionalAttributeByName(String attribute)
Retrieves an optional attribute by attribute name.
|
Optional<XmlElement> |
getOptionalElementByName(String tagName)
Retrieves a single child element by tag name.
|
String |
textContent() |
public String elementName()
public List<XmlElement> children()
public XmlElement getFirstChild()
public List<XmlElement> getElementsByName(String tagName)
tagName - Tag name of elements to retrieve.public XmlElement getElementByName(String tagName)
tagName - Tag name of element to get.SdkClientException - If more than one element with the given tag name is found.public Optional<XmlElement> getOptionalElementByName(String tagName)
tagName - Tag name of element to get.Optional of XmlElement with the matching tag name or empty Optional if no element exists.SdkClientException - If more than one element with the given tag name is found.public String textContent()
public Optional<String> getOptionalAttributeByName(String attribute)
public Map<String,String> attributes()
public static XmlElement.Builder builder()
XmlElement.Builder instance.public static XmlElement empty()
XmlElement (Copyright © 2023. All rights reserved.