public final class XmlUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ENCODING |
Modifier and Type | Method and Description |
---|---|
static Marshaller |
createMarshaller()
Creates a marshaller for XML generation.
|
static Marshaller |
createMarshaller(String encoding,
boolean prettyPrint)
Creates a marshaller for XML generation.
|
static Unmarshaller |
createUnmarshaller()
Creates an unmarshaller for XML parsing.
|
static JAXBContext |
getContext()
Returns the JAXB context for XML parsing / generation.
|
static void |
initContext(ClassLoader classloader)
Initialize the JAXB context.
|
static String |
marshal(Object object)
Creates a XML string for a JAXB object.
|
static String |
marshal(Object object,
String encoding)
Creates a XML string for a JAXB object.
|
static String |
marshal(Object object,
String encoding,
boolean prettyPrint)
Creates a XML string for a JAXB object.
|
static Color |
parseColor(String value)
Reads a
Color value from XML. |
static Calendar |
parseDate(String value)
Reads a
Calendar value from XML. |
static Double |
parseDouble13_2(String value)
Reads a
Double value from XML
with maximal 13 digits and 2 decimal places. |
static Double |
parseDouble8_2(String value)
Reads a
Double value from XML
with maximal 8 digits and 2 decimal places. |
static Double |
parseDoublePositive(String value)
Reads a positive
Double value from XML
with maximal 3 decimal places. |
static String |
parseEmail(String value)
Reads an e-mail address from XML.
|
static Integer |
parseFlatShareSearchSize(String value)
Reads an
Integer value from XML,
that matches the 'FlatShareSearchSize' simple type. |
static Integer |
parseFloorNr(String value)
Reads an
Integer value from XML,
that matches the type of the 'numberOfFloors' element. |
static Integer |
parseGroupNr(String value)
Reads an
Integer value from XML,
that matches the type of the 'groupNumber' element. |
static Integer |
parseInteger99(String value)
Reads an
Integer value from XML
from 0 to 99. |
static Integer |
parseInteger999(String value)
Reads an
Integer value from XML
from 0 to 999. |
static Integer |
parseInteger9999(String value)
Reads an
Integer value from XML
from 0 to 9999. |
static Integer |
parseInteger99999(String value)
Reads an
Integer value from XML
from 0 to 99999. |
static Integer |
parseInteger9999Positive(String value)
Reads a positive
Integer value from XML
up to 9999. |
static Integer |
parseInteger9Positive(String value)
Reads a positive
Integer value from XML
with maximal 9 digits. |
static Double |
parseLatitude(String value)
Reads a
Double value from XML
with a valid latitude range. |
static Double |
parseLongitude(String value)
Reads a
Double value from XML
with a valid longitude range. |
static String |
parseNonEmptyText(String value)
Reads a
String value from XML
with a at least 1 character. |
static String |
parsePassword(String value)
Reads a
String value from XML,
that matches the 'Password' simple type. |
static String |
parsePhoneNumber(String value)
Reads a
String value from XML
with a valid phone number. |
static String |
parsePhoneNumberAreaCode(String value)
Reads a
String value from XML
with a valid phone number area code. |
static String |
parsePhoneNumberCountryCode(String value)
Reads a
String value from XML
with a valid phone number country code. |
static String |
parsePhoneNumberSubscriber(String value)
Reads a
String value from XML
with a valid phone number subscriber part. |
static Double |
parsePriceMultiplier(String value)
Reads a
Double value from XML,
that matches the 'PriceMultiplierType' simple type. |
static Double |
parseRoomNr(String value)
Reads a
Double value from XML,
that matches the 'NumberOfRoomsType' simple type. |
static Double |
parseRoomNrForBaseHouse(String value)
Reads a
Double value from XML,
that matches the type of the 'numberOfRooms' element in "BaseHouse". |
static String |
parseText100(String value)
Reads a
String value from XML
with maximal 100 characters. |
static String |
parseText1000(String value)
Reads a
String value from XML
with maximal 1000 characters. |
static String |
parseText15(String value)
Reads a
String value from XML
with maximal 15 characters. |
static String |
parseText16(String value)
Reads a
String value from XML
with maximal 16 characters. |
static String |
parseText18(String value)
Reads a
String value from XML
with maximal 18 characters. |
static String |
parseText1800(String value)
Reads a
String value from XML
with maximal 1800 characters. |
static String |
parseText20(String value)
Reads a
String value from XML
with maximal 20 characters. |
static String |
parseText2000(String value)
Reads a
String value from XML
with maximal 2000 characters. |
static String |
parseText30(String value)
Reads a
String value from XML
with maximal 30 characters. |
static String |
parseText40(String value)
Reads a
String value from XML
with maximal 40 characters. |
static String |
parseText50(String value)
Reads a
String value from XML
with maximal 50 characters. |
static String |
parseText80(String value)
Reads a
String value from XML
with maximal 80 characters. |
static Double |
parseThermalCharacteristic(String value)
Reads a
Double value from XML,
that matches the type of the "thermalCharacteristic" element. |
static URL |
parseUrl(String value)
Reads an
URL value from XML. |
static String |
printColor(Color value)
Writes a
Color value into XML output. |
static String |
printDate(Calendar value)
Writes a
Calendar value into XML output. |
static String |
printDouble13_2(Double value)
Writes a
Double value into XML output
with maximal 13 digits and 2 decimal places. |
static String |
printDouble8_2(Double value)
Writes a
Double value into XML output
with maximal 8 digits and 2 decimal places. |
static String |
printDoublePositive(Double value)
Writes a positive
Double value into XML output
with maximal 3 decimal places. |
static String |
printEmail(String value)
Writes an e-mail address into XML output.
|
static String |
printFlatShareSearchSize(Integer value)
Writes an
Integer value into XML output,
that matches the 'FlatShareSearchSize' simple type. |
static String |
printFloorNr(Integer value)
Writes an
Integer value into XML output,
that matches the type of the 'numberOfFloors' element. |
static String |
printGroupNr(Integer value)
Writes an
Integer value into XML output,
that matches the type of the 'groupNumber' element. |
static String |
printInteger99(Integer value)
Writes an
Integer value into XML output
from 0 to 99. |
static String |
printInteger999(Integer value)
Writes an
Integer value into XML output
from 0 to 999. |
static String |
printInteger9999(Integer value)
Writes an
Integer value into XML output
from 0 to 9999. |
static String |
printInteger99999(Integer value)
Writes an
Integer value into XML output
from 0 to 99999. |
static String |
printInteger9999Positive(Integer value)
Writes a positive
Integer value into XML output
up to 9999. |
static String |
printInteger9Positive(Integer value)
Writes a positive
Integer value into XML output
with maximal 9 digits. |
static String |
printLatitude(Double value)
Writes a
Double value into XML output
with a valid latitude range. |
static String |
printLongitude(Double value)
Writes a
Double value into XML output
with a valid longitude range. |
static String |
printNonEmptyText(String value)
Writes a
String value into XML output
with a at least 1 character. |
static String |
printPassword(String value)
Writes a
String value into XML output,
that matches the 'Password' simple type. |
static String |
printPhoneNumber(String value)
Writes a
String value into XML output
with a valid phone number. |
static String |
printPhoneNumberAreaCode(String value)
Writes a
String value into XML output
with a valid phone number area code. |
static String |
printPhoneNumberCountryCode(String value)
Writes a
String value into XML output
with a valid phone number country code. |
static String |
printPhoneNumberSubscriber(String value)
Writes a
String value into XML output
with a valid phone number subscriber part. |
static String |
printPriceMultiplier(Double value)
Writes a
Double value into XML output,
that matches the 'PriceMultiplierType' simple type. |
static String |
printRoomNr(Double value)
Writes a
Double value into XML output,
that matches the 'NumberOfRoomsType' simple type. |
static String |
printRoomNrForBaseHouse(Double value)
Writes a
Double value into XML output,
that matches the type of the 'numberOfRooms' element in "BaseHouse". |
static String |
printText100(String value)
Writes a
String value into XML output
with maximal 100 characters. |
static String |
printText1000(String value)
Writes a
String value into XML output
with maximal 1000 characters. |
static String |
printText15(String value)
Writes a
String value into XML output
with maximal 15 characters. |
static String |
printText16(String value)
Writes a
String value into XML output
with maximal 16 characters. |
static String |
printText18(String value)
Writes a
String value into XML output
with maximal 18 characters. |
static String |
printText1800(String value)
Writes a
String value into XML output
with maximal 1800 characters. |
static String |
printText20(String value)
Writes a
String value into XML output
with maximal 20 characters. |
static String |
printText2000(String value)
Writes a
String value into XML output
with maximal 2000 characters. |
static String |
printText30(String value)
Writes a
String value into XML output
with maximal 30 characters. |
static String |
printText40(String value)
Writes a
String value into XML output
with maximal 40 characters. |
static String |
printText50(String value)
Writes a
String value into XML output
with maximal 50 characters. |
static String |
printText80(String value)
Writes a
String value into XML output
with maximal 80 characters. |
static String |
printThermalCharacteristic(Double value)
Writes a
Double value into XML output,
that matches the type of the "thermalCharacteristic" element. |
static String |
printUrl(URL value)
Writes an
URL value into XML output. |
static Object |
unmarshal(String xml)
Creates a JAXB object from a XML string.
|
static void |
writeXml(Attachment attachment,
Marshaller marshaller,
OutputStream output)
Writes an
Attachment as XML into an OutputStream . |
static void |
writeXml(Attachment attachment,
OutputStream output)
Writes an
Attachment as XML into an OutputStream . |
static void |
writeXml(Attachment attachment,
String encoding,
boolean prettyPrint,
OutputStream output)
Writes an
Attachment as XML into an OutputStream . |
static void |
writeXml(Attachment attachment,
String encoding,
OutputStream output)
Writes an
Attachment as XML into an OutputStream . |
static void |
writeXml(PublishObject publishing,
Marshaller marshaller,
OutputStream output)
Writes a
PublishObject as XML into an OutputStream . |
static void |
writeXml(PublishObject publishing,
OutputStream output)
Writes a
PublishObject as XML into an OutputStream . |
static void |
writeXml(PublishObject publishing,
String encoding,
boolean prettyPrint,
OutputStream output)
Writes a
PublishObject as XML into an OutputStream . |
static void |
writeXml(PublishObject publishing,
String encoding,
OutputStream output)
Writes a
PublishObject as XML into an OutputStream . |
static void |
writeXml(RealEstate realEstate,
Marshaller marshaller,
OutputStream output)
Writes a
RealEstate as XML into an OutputStream . |
static void |
writeXml(RealEstate realEstate,
OutputStream output)
Writes a
RealEstate as XML into an OutputStream . |
static void |
writeXml(RealEstate realEstate,
String encoding,
boolean prettyPrint,
OutputStream output)
Writes a
RealEstate as XML into an OutputStream . |
static void |
writeXml(RealEstate realEstate,
String encoding,
OutputStream output)
Writes a
RealEstate as XML into an OutputStream . |
static void |
writeXml(RealtorContactDetails contact,
Marshaller marshaller,
OutputStream output)
Writes a
RealtorContactDetails as XML into an OutputStream . |
static void |
writeXml(RealtorContactDetails contact,
OutputStream output)
Writes a
RealtorContactDetails as XML into an OutputStream . |
static void |
writeXml(RealtorContactDetails contact,
String encoding,
boolean prettyPrint,
OutputStream output)
Writes a
RealtorContactDetails as XML into an OutputStream . |
static void |
writeXml(RealtorContactDetails contact,
String encoding,
OutputStream output)
Writes a
RealtorContactDetails as XML into an OutputStream . |
public static final String DEFAULT_ENCODING
public static Marshaller createMarshaller() throws JAXBException
JAXBException
- if the marshaller is not creatablepublic static Marshaller createMarshaller(String encoding, boolean prettyPrint) throws JAXBException
encoding
- encoding of generated XML outputprettyPrint
- enable pretty printing for generated XML outputJAXBException
- if the marshaller is not creatablepublic static Unmarshaller createUnmarshaller() throws JAXBException
JAXBException
- if the unmarshaller is not creatablepublic static JAXBContext getContext() throws JAXBException
JAXBException
- if the JAXB context is not initialized properlypublic static void initContext(ClassLoader classloader) throws JAXBException
classloader
- class loader to access JAXB classesJAXBException
- if the JAXB context is not initialized properlypublic static String marshal(Object object) throws JAXBException, IOException
object
- JAXB object, that is converted into XML outputJAXBException
- if XML can't be writtenIOException
- if XML can't be writtenpublic static String marshal(Object object, String encoding) throws JAXBException, IOException
object
- JAXB object, that is converted into XML outputencoding
- encoding of generated XML outputJAXBException
- if XML can't be writtenIOException
- if XML can't be writtenpublic static String marshal(Object object, String encoding, boolean prettyPrint) throws JAXBException, IOException
object
- JAXB object, that is converted into XML outputencoding
- encoding of generated XML outputprettyPrint
- enable pretty printing for generated XML outputJAXBException
- if XML can't be writtenIOException
- if XML can't be writtenpublic static Color parseColor(String value)
Color
value from XML.value
- XML stringpublic static Calendar parseDate(String value)
Calendar
value from XML.value
- XML stringpublic static Double parseDouble8_2(String value)
Double
value from XML
with maximal 8 digits and 2 decimal places.value
- XML stringpublic static Double parseDouble13_2(String value)
Double
value from XML
with maximal 13 digits and 2 decimal places.value
- XML stringpublic static Double parseDoublePositive(String value)
Double
value from XML
with maximal 3 decimal places.value
- XML stringpublic static String parseEmail(String value)
value
- XML stringpublic static Integer parseFlatShareSearchSize(String value)
Integer
value from XML,
that matches the 'FlatShareSearchSize' simple type.value
- XML stringpublic static Integer parseFloorNr(String value)
Integer
value from XML,
that matches the type of the 'numberOfFloors' element.value
- XML stringpublic static Integer parseGroupNr(String value)
Integer
value from XML,
that matches the type of the 'groupNumber' element.value
- XML stringpublic static Integer parseInteger9Positive(String value)
Integer
value from XML
with maximal 9 digits.value
- XML stringpublic static Integer parseInteger99(String value)
Integer
value from XML
from 0 to 99.value
- XML stringpublic static Integer parseInteger999(String value)
Integer
value from XML
from 0 to 999.value
- XML stringpublic static Integer parseInteger9999(String value)
Integer
value from XML
from 0 to 9999.value
- XML stringpublic static Integer parseInteger9999Positive(String value)
Integer
value from XML
up to 9999.value
- XML stringpublic static Integer parseInteger99999(String value)
Integer
value from XML
from 0 to 99999.value
- XML stringpublic static Double parseLatitude(String value)
Double
value from XML
with a valid latitude range.value
- XML stringpublic static Double parseLongitude(String value)
Double
value from XML
with a valid longitude range.value
- XML stringpublic static String parseNonEmptyText(String value)
String
value from XML
with a at least 1 character.value
- XML stringpublic static String parsePassword(String value)
String
value from XML,
that matches the 'Password' simple type.value
- XML stringpublic static String parsePhoneNumber(String value)
String
value from XML
with a valid phone number.value
- XML stringpublic static String parsePhoneNumberAreaCode(String value)
String
value from XML
with a valid phone number area code.value
- XML stringpublic static String parsePhoneNumberCountryCode(String value)
String
value from XML
with a valid phone number country code.value
- XML stringpublic static String parsePhoneNumberSubscriber(String value)
String
value from XML
with a valid phone number subscriber part.value
- XML stringpublic static Double parsePriceMultiplier(String value)
Double
value from XML,
that matches the 'PriceMultiplierType' simple type.value
- XML stringpublic static Double parseRoomNr(String value)
Double
value from XML,
that matches the 'NumberOfRoomsType' simple type.value
- XML stringpublic static Double parseRoomNrForBaseHouse(String value)
Double
value from XML,
that matches the type of the 'numberOfRooms' element in "BaseHouse".value
- XML stringpublic static String parseText15(String value)
String
value from XML
with maximal 15 characters.value
- XML stringpublic static String parseText16(String value)
String
value from XML
with maximal 16 characters.value
- XML stringpublic static String parseText18(String value)
String
value from XML
with maximal 18 characters.value
- XML stringpublic static String parseText20(String value)
String
value from XML
with maximal 20 characters.value
- XML stringpublic static String parseText30(String value)
String
value from XML
with maximal 30 characters.value
- XML stringpublic static String parseText40(String value)
String
value from XML
with maximal 40 characters.value
- XML stringpublic static String parseText50(String value)
String
value from XML
with maximal 50 characters.value
- XML stringpublic static String parseText80(String value)
String
value from XML
with maximal 80 characters.value
- XML stringpublic static String parseText100(String value)
String
value from XML
with maximal 100 characters.value
- XML stringpublic static String parseText1000(String value)
String
value from XML
with maximal 1000 characters.value
- XML stringpublic static String parseText1800(String value)
String
value from XML
with maximal 1800 characters.value
- XML stringpublic static String parseText2000(String value)
String
value from XML
with maximal 2000 characters.value
- XML stringpublic static Double parseThermalCharacteristic(String value)
Double
value from XML,
that matches the type of the "thermalCharacteristic" element.value
- XML stringpublic static URL parseUrl(String value)
URL
value from XML.value
- XML stringpublic static String printColor(Color value)
Color
value into XML output.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printDate(Calendar value)
Calendar
value into XML output.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printDouble8_2(Double value)
Double
value into XML output
with maximal 8 digits and 2 decimal places.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printDouble13_2(Double value)
Double
value into XML output
with maximal 13 digits and 2 decimal places.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printDoublePositive(Double value)
Double
value into XML output
with maximal 3 decimal places.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printEmail(String value)
value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printFlatShareSearchSize(Integer value)
Integer
value into XML output,
that matches the 'FlatShareSearchSize' simple type.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printFloorNr(Integer value)
Integer
value into XML output,
that matches the type of the 'numberOfFloors' element.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printGroupNr(Integer value)
Integer
value into XML output,
that matches the type of the 'groupNumber' element.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printInteger9Positive(Integer value)
Integer
value into XML output
with maximal 9 digits.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printInteger99(Integer value)
Integer
value into XML output
from 0 to 99.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printInteger999(Integer value)
Integer
value into XML output
from 0 to 999.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printInteger9999(Integer value)
Integer
value into XML output
from 0 to 9999.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printInteger9999Positive(Integer value)
Integer
value into XML output
up to 9999.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printInteger99999(Integer value)
Integer
value into XML output
from 0 to 99999.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printLatitude(Double value)
Double
value into XML output
with a valid latitude range.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printLongitude(Double value)
Double
value into XML output
with a valid longitude range.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printNonEmptyText(String value)
String
value into XML output
with a at least 1 character.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printPassword(String value)
String
value into XML output,
that matches the 'Password' simple type.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printPhoneNumber(String value)
String
value into XML output
with a valid phone number.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printPhoneNumberAreaCode(String value)
String
value into XML output
with a valid phone number area code.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printPhoneNumberCountryCode(String value)
String
value into XML output
with a valid phone number country code.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printPhoneNumberSubscriber(String value)
String
value into XML output
with a valid phone number subscriber part.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printPriceMultiplier(Double value)
Double
value into XML output,
that matches the 'PriceMultiplierType' simple type.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printRoomNr(Double value)
Double
value into XML output,
that matches the 'NumberOfRoomsType' simple type.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printRoomNrForBaseHouse(Double value)
Double
value into XML output,
that matches the type of the 'numberOfRooms' element in "BaseHouse".value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText15(String value)
String
value into XML output
with maximal 15 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText16(String value)
String
value into XML output
with maximal 16 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText18(String value)
String
value into XML output
with maximal 18 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText20(String value)
String
value into XML output
with maximal 20 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText30(String value)
String
value into XML output
with maximal 30 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText40(String value)
String
value into XML output
with maximal 40 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText50(String value)
String
value into XML output
with maximal 50 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText80(String value)
String
value into XML output
with maximal 80 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText100(String value)
String
value into XML output
with maximal 100 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText1000(String value)
String
value into XML output
with maximal 1000 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText1800(String value)
String
value into XML output
with maximal 1800 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printText2000(String value)
String
value into XML output
with maximal 2000 characters.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printThermalCharacteristic(Double value)
Double
value into XML output,
that matches the type of the "thermalCharacteristic" element.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static String printUrl(URL value)
URL
value into XML output.value
- value to writeIllegalArgumentException
- if a validation error occuredpublic static Object unmarshal(String xml) throws JAXBException
xml
- XML stringJAXBException
- if XML can't be readpublic static void writeXml(Attachment attachment, OutputStream output) throws JAXBException
Attachment
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
attachment
- object to writeoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(Attachment attachment, String encoding, OutputStream output) throws JAXBException
Attachment
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
attachment
- object to writeencoding
- encoding of generated XML outputoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(Attachment attachment, String encoding, boolean prettyPrint, OutputStream output) throws JAXBException
Attachment
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
attachment
- object to writeencoding
- encoding of generated XML outputprettyPrint
- enable pretty printing for generated XML outputoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(Attachment attachment, Marshaller marshaller, OutputStream output) throws JAXBException
Attachment
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
attachment
- object to writemarshaller
- marshaller, that is used for XML generationoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(PublishObject publishing, OutputStream output) throws JAXBException
PublishObject
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
publishing
- object to writeoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(PublishObject publishing, String encoding, OutputStream output) throws JAXBException
PublishObject
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
publishing
- object to writeencoding
- encoding of generated XML outputoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(PublishObject publishing, String encoding, boolean prettyPrint, OutputStream output) throws JAXBException
PublishObject
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
publishing
- object to writeencoding
- encoding of generated XML outputprettyPrint
- enable pretty printing for generated XML outputoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(PublishObject publishing, Marshaller marshaller, OutputStream output) throws JAXBException
PublishObject
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
publishing
- object to writemarshaller
- marshaller, that is used for XML generationoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(RealtorContactDetails contact, OutputStream output) throws JAXBException
RealtorContactDetails
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
contact
- object to writeoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(RealtorContactDetails contact, String encoding, OutputStream output) throws JAXBException
RealtorContactDetails
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
contact
- object to writeencoding
- encoding of generated XML outputoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(RealtorContactDetails contact, String encoding, boolean prettyPrint, OutputStream output) throws JAXBException
RealtorContactDetails
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
contact
- object to writeencoding
- encoding of generated XML outputprettyPrint
- enable pretty printing for generated XML outputoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(RealtorContactDetails contact, Marshaller marshaller, OutputStream output) throws JAXBException
RealtorContactDetails
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
contact
- object to writemarshaller
- marshaller, that is used for XML generationoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(RealEstate realEstate, OutputStream output) throws JAXBException
RealEstate
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
realEstate
- object to writeoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(RealEstate realEstate, String encoding, OutputStream output) throws JAXBException
RealEstate
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
realEstate
- object to writeencoding
- encoding of generated XML outputoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(RealEstate realEstate, String encoding, boolean prettyPrint, OutputStream output) throws JAXBException
RealEstate
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
realEstate
- object to writeencoding
- encoding of generated XML outputprettyPrint
- enable pretty printing for generated XML outputoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationpublic static void writeXml(RealEstate realEstate, Marshaller marshaller, OutputStream output) throws JAXBException
RealEstate
as XML into an OutputStream
.
The provided object is wrapped into a JAXBElement
before XML
creation in order to match the requirements of the schema.
This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
realEstate
- object to writemarshaller
- marshaller, that is used for XML generationoutput
- stream, where the XML is written toJAXBException
- if an error occured during XML creationCopyright © 2014 OpenEstate. All rights reserved.