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 |
---|---|
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<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 static XmlElement.Builder builder()
XmlElement.Builder
instance.public static XmlElement empty()
XmlElement
(Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.