Class XmlHelper
java.lang.Object
com.yahoo.config.model.builder.xml.XmlHelper
Static methods for helping dom building
- Author:
- bratseth
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Document
getDocument
(Reader reader) static Document
getDocument
(Reader reader, String source) static DocumentBuilder
Creates a new XML document builder.static com.yahoo.component.ComponentId
static com.yahoo.component.ComponentSpecification
static String
getIdString
(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 boolean
isReference
(Element element) static String
nullIfEmpty
(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
-