Package io.milton.http
Class XmlWriter.Element
java.lang.Object
io.milton.http.XmlWriter.Element
- Enclosing class:
- XmlWriter
Represents an element which is currently being written
-
Method Summary
Modifier and TypeMethodDescriptionStart a new element, completing the open tag if requiredclose()Closes the tag by determining its current state.close(boolean newline) Write a self closing tag, eg />noContent(boolean newLine) open()Completes the opening tag which is started in the constructor.open(boolean newline) Write a property element like -value Write a name/value attribute pairWrite the text into the element.
-
Method Details
-
writeAtt
Write a name/value attribute pair- Parameters:
name-value-- Returns:
-
writeText
Write the text into the element. Will finish the opening tag if required- Parameters:
text-- Returns:
-
writeText
-
open
Completes the opening tag which is started in the constructor. And writes a new line Eg >- Returns:
-
open
-
close
Closes the tag by determining its current state. Can close with a no-content tag if no content has been written, or with write a close tag- Returns:
- - the parent element
-
close
-
noContent
Write a self closing tag, eg />- Returns:
- - the parent element
-
noContent
-
begin
Start a new element, completing the open tag if required- Parameters:
name-- Returns:
-
begin
-
begin
-
begin
-
prop
Write a property element like -value - Parameters:
name-value-- Returns:
-
prop
-