Class XmlHelper
java.lang.Object
com.yahoo.config.model.builder.xml.XmlHelper
Static methods for helping dom building
- Author:
- bratseth
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentgetDocument(Reader reader) static DocumentgetDocument(Reader reader, String source) static DocumentBuilderCreates a new XML document builder.static com.yahoo.component.ComponentIdstatic com.yahoo.component.ComponentSpecificationstatic StringgetIdString(Element element) For searchers inside search chains, the id may be both a reference and an id at once, or just a reference.getOptionalAttribute(Element element, String name) getOptionalChild(Element parent, String childName) getOptionalChildValue(Element parent, String childName) static booleanisReference(Element element) static StringnullIfEmpty(String attribute) spaceSeparatedSymbols(String field) static Collection<String>spaceSeparatedSymbolsFromAttribute(Element spec, String name) splitAndDiscardEmpty(String field, String regex) static Collection<String>valuesFromElements(Element parent, String elementName)
-
Field Details
-
factory
-
-
Method Details
-
nullIfEmpty
-
getIdString
For searchers inside search chains, the id may be both a reference and an id at once, or just a reference. In other cases, it is clear which one it is from context, so I think the difference is not worth bothering users with, unless they are XML purists in which case they will have the option of writing this correctly. - Jon -
getId
-
getIdRef
-
getDocument
-
getDocument
-
splitAndDiscardEmpty
-
spaceSeparatedSymbols
-
spaceSeparatedSymbolsFromAttribute
-
valuesFromElements
-
isReference
-
getDocumentBuilder
Creates a new XML document builder.- Returns:
- a new DocumentBuilder instance, or null if we fail to get one.
-
getOptionalAttribute
-
getOptionalChild
-
getOptionalChildValue
-