Uses of Interface
org.tquadrat.foundation.xml.builder.XMLDocument
Packages that use XMLDocument
Package
Description
Classes for builder XML elements and documents.
The internal classes for the implementation of the XML builder tools.
-
Uses of XMLDocument in org.tquadrat.foundation.xml.builder
Methods in org.tquadrat.foundation.xml.builder that return XMLDocumentModifier and TypeMethodDescriptiondefault XMLDocument
XMLDocument.addChild
(XMLElement child) Adds a child to the root element of this document.default XMLDocument
XMLDocument.addComment
(CharSequence comment) Adds a comment to the root element of this document.default XMLDocument
XMLDocument.addDocumentComment
(CharSequence comment) Adds a comment to the document itself.default XMLDocument
XMLDocument.addPredefinedMarkup
(CharSequence markup) Adds predefined XML markup to the root element of this document.default XMLDocument
XMLDocument.addProcessingInstruction
(ProcessingInstruction processingInstruction) Adds a processing instruction to this document.static final XMLDocument
XMLBuilderUtils.createXMLDocument()
Creates an XML document that will not have an explicit doc type, the root element will be<root>
static final XMLDocument
XMLBuilderUtils.createXMLDocument
(String elementName) Creates an XML document that uses the given element name for the root element.static final XMLDocument
XMLBuilderUtils.createXMLDocument
(XMLElement rootElement) Creates an XML document that uses the given element for the root element.static final XMLDocument
XMLBuilderUtils.createXMLDocument
(XMLElement rootElement, boolean standalone) Creates an XML document that uses the given element for the root element.static final XMLDocument
XMLBuilderUtils.createXMLDocument
(XMLElement rootElement, Charset encoding, String name, URI uri) Creates an XML document that uses the given element for the root element with the given encoding and DTD.static final XMLDocument
XMLBuilderUtils.createXMLDocument
(XMLElement rootElement, Charset encoding, URI uri) Creates an XML document that uses the given element for the root element with the given encoding and DTD.default XMLDocument
XMLDocument.setAttribute
(String name, boolean flag) Sets the attribute with the given name to the root element of this document.
The method usesBoolean.toString(boolean)
to convert the provided flag to aString
.default XMLDocument
XMLDocument.setAttribute
(String name, double number) Sets the attribute with the given name to the root element of this document.
The method usesDouble.toString(double)
to convert the provided number to aString
.default XMLDocument
XMLDocument.setAttribute
(String name, int number) Sets the attribute with the given name to the root element of this document.
The method usesInteger.toString(int)
to convert the provided number to aString
.default XMLDocument
XMLDocument.setAttribute
(String name, long number) Sets the attribute with the given name to the root element of this document.
The method usesLong.toString(long)
to convert the provided number to aString
.default <E extends Enum<E>>
XMLDocumentXMLDocument.setAttribute
(String name, E enumValue) Sets the attribute with the given name to the root element of this document.
The method usesEnum.name()
to convert the provided value to aString
.default XMLDocument
XMLDocument.setAttribute
(String name, Boolean flag) Sets the attribute with the given name to the root element of this document.
The method usesBoolean.toString()
to convert the provided flag to aString
.default XMLDocument
XMLDocument.setAttribute
(String name, CharSequence value) Sets the attribute with the given name to the root element of this document.default XMLDocument
XMLDocument.setAttribute
(String name, CharSequence value, Optional<? extends CharSequence> append) Sets the attribute with the given name to the root element of this document.default XMLDocument
XMLDocument.setAttribute
(String name, Number number) Sets the attribute with the given name to the root element of this document.
The method usesObject.toString()
to convert the provided number to aString
.default XMLDocument
XMLDocument.setAttribute
(String name, Instant date) Sets the attribute with the given name to the root element of this document.
The method usesInstant.toString()
to convert the provided number to aString
.default XMLDocument
XMLDocument.setAttribute
(String name, LocalDate date) Sets the attribute with the given name to the root element of this document.
The method usesLocalDate.toString()
to convert the provided number to aString
.default XMLDocument
XMLDocument.setAttribute
(String name, LocalDateTime date) Sets the attribute with the given name to the root element of this document.
The method usesLocalDateTime.toString()
to convert the provided number to aString
.default XMLDocument
XMLDocument.setAttribute
(String name, ZonedDateTime date) Sets the attribute with the given name to the root element of this document.
The method usesZonedDateTime.toString()
to convert the provided number to aString
.default XMLDocument
XMLDocument.setAttributeIfNotEmpty
(String name, CharSequence value) Sets the attribute with the given name to the root element of this document if the provided value is not empty.
The method usesStringUtils.isNotEmpty(CharSequence)
to test if the given value is empty.default XMLDocument
XMLDocument.setAttributeIfNotEmpty
(String name, Optional<? extends CharSequence> optional) Sets the attribute with the given name to the root element of this document if the provided value is not empty.default XMLDocument
Sets the id for the root element of this document.
The value will be validated using the method that is provided by a call toXMLBuilderUtils.getNMTokenValidator()
.default XMLDocument
XMLDocument.setNamespace
(String identifier) Sets the given namespace to the root element of this document.default XMLDocument
XMLDocument.setNamespace
(String prefix, String identifier) Sets the given namespace to the root element of this document.
The given prefix is validated using the method that is provided byXMLBuilderUtils.getPrefixValidator()
.default XMLDocument
XMLDocument.setNamespace
(String prefix, URI identifier) Sets the given namespace to the root element of this document.
The given prefix is validated using the method that is provided byXMLBuilderUtils.getPrefixValidator()
.default XMLDocument
XMLDocument.setNamespace
(URI identifier) Sets the given namespace to the root element of this document.default XMLDocument
XMLDocument.setNamespace
(Namespace namespace) Sets the given namespace to the root element of this document.Methods in org.tquadrat.foundation.xml.builder with parameters of type XMLDocumentModifier and TypeMethodDescriptionstatic final ProcessingInstruction
XMLBuilderUtils.createProcessingInstruction
(XMLDocument parent, String elementName) Creates aProcessingInstruction
.static final ProcessingInstruction
XMLBuilderUtils.createProcessingInstruction
(XMLDocument parent, String elementName, CharSequence data) Creates aProcessingInstruction
.static final XMLElement
XMLBuilderUtils.createXMLElement
(String elementName, XMLDocument parent) Creates an XML element for the given tag and adds it as child to the given document.
The given element name is validated using the method that is provided byXMLBuilderUtils.getElementNameValidator()
.
The new element allows attributes and children, but will not validate them.static final XMLElement
XMLBuilderUtils.createXMLElement
(String elementName, XMLDocument parent, CharSequence text) Creates an XML element for the given tag and with the given text, and adds it as child to the given document.
The given element name is validated using the method that is provided byXMLBuilderUtils.getElementNameValidator()
.
The new element allows attributes and children, but will not validate them.default XMLElement
XMLElementFactory.createXMLElement
(String elementName, XMLDocument parent) Creates an XML element for the given tag and adds it as child to the given document.
The given element name is validated using the method that is provided byXMLBuilderUtils.getElementNameValidator()
.default XMLElement
XMLElementFactory.createXMLElement
(String elementName, XMLDocument parent, CharSequence text) Creates an XML element for the given tag and with the given text, and adds it as child to the given document.
The given element name is validated using the method that is provided byXMLBuilderUtils.getElementNameValidator()
. -
Uses of XMLDocument in org.tquadrat.foundation.xml.builder.internal
Classes in org.tquadrat.foundation.xml.builder.internal that implement XMLDocumentModifier and TypeClassDescriptionfinal class
The implementation for the interfaceXMLDocument
.
It allows document comments and processing instructions to be added.Methods in org.tquadrat.foundation.xml.builder.internal that return XMLDocumentModifier and TypeMethodDescriptionfinal <E extends Element>
XMLDocumentXMLDocumentImpl.addDocumentChild
(E child) Adds a child to the document itself, not to the root element.final XMLDocument
XMLDocumentImpl.addDocumentComment
(CharSequence comment) Adds a comment to the document itself.final XMLDocument
XMLDocumentImpl.addProcessingInstruction
(ProcessingInstruction processingInstruction) Adds a processing instruction to this document.