XmlReadSettings Class

public final class XmlReadSettings
extends FormatReadSettings

Xml read settings.

Constructor Summary

Constructor Description
XmlReadSettings()

Creates an instance of XmlReadSettings class.

Method Summary

Modifier and Type Method and Description
CompressionReadSettings compressionProperties()

Get the compressionProperties property: Compression settings.

Object detectDataType()

Get the detectDataType property: Indicates whether type detection is enabled when reading the xml files.

static XmlReadSettings fromJson(JsonReader jsonReader)

Reads an instance of XmlReadSettings from the JsonReader.

Object namespacePrefixes()

Get the namespacePrefixes property: Namespace uri to prefix mappings to override the prefixes in column names when namespace is enabled, if no prefix is defined for a namespace uri, the prefix of xml element/attribute name in the xml data file will be used.

Object namespaces()

Get the namespaces property: Indicates whether namespace is enabled when reading the xml files.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The read setting type.

void validate()

Validates the instance.

Object validationMode()

Get the validationMode property: Indicates what validation method is used when reading the xml files.

XmlReadSettings withCompressionProperties(CompressionReadSettings compressionProperties)

Set the compressionProperties property: Compression settings.

XmlReadSettings withDetectDataType(Object detectDataType)

Set the detectDataType property: Indicates whether type detection is enabled when reading the xml files.

XmlReadSettings withNamespacePrefixes(Object namespacePrefixes)

Set the namespacePrefixes property: Namespace uri to prefix mappings to override the prefixes in column names when namespace is enabled, if no prefix is defined for a namespace uri, the prefix of xml element/attribute name in the xml data file will be used.

XmlReadSettings withNamespaces(Object namespaces)

Set the namespaces property: Indicates whether namespace is enabled when reading the xml files.

XmlReadSettings withValidationMode(Object validationMode)

Set the validationMode property: Indicates what validation method is used when reading the xml files.

Methods inherited from FormatReadSettings

Methods inherited from java.lang.Object

Constructor Details

XmlReadSettings

public XmlReadSettings()

Creates an instance of XmlReadSettings class.

Method Details

compressionProperties

public CompressionReadSettings compressionProperties()

Get the compressionProperties property: Compression settings.

Returns:

the compressionProperties value.

detectDataType

public Object detectDataType()

Get the detectDataType property: Indicates whether type detection is enabled when reading the xml files. Type: boolean (or Expression with resultType boolean).

Returns:

the detectDataType value.

fromJson

public static XmlReadSettings fromJson(JsonReader jsonReader)

Reads an instance of XmlReadSettings from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of XmlReadSettings if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the XmlReadSettings.

namespacePrefixes

public Object namespacePrefixes()

Get the namespacePrefixes property: Namespace uri to prefix mappings to override the prefixes in column names when namespace is enabled, if no prefix is defined for a namespace uri, the prefix of xml element/attribute name in the xml data file will be used. Example: "{"http://www.example.com/xml":"prefix"}" Type: object (or Expression with resultType object).

Returns:

the namespacePrefixes value.

namespaces

public Object namespaces()

Get the namespaces property: Indicates whether namespace is enabled when reading the xml files. Type: boolean (or Expression with resultType boolean).

Returns:

the namespaces value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

XmlReadSettings.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The read setting type.

Overrides:

XmlReadSettings.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

XmlReadSettings.validate()

validationMode

public Object validationMode()

Get the validationMode property: Indicates what validation method is used when reading the xml files. Allowed values: 'none', 'xsd', or 'dtd'. Type: string (or Expression with resultType string).

Returns:

the validationMode value.

withCompressionProperties

public XmlReadSettings withCompressionProperties(CompressionReadSettings compressionProperties)

Set the compressionProperties property: Compression settings.

Parameters:

compressionProperties - the compressionProperties value to set.

Returns:

the XmlReadSettings object itself.

withDetectDataType

public XmlReadSettings withDetectDataType(Object detectDataType)

Set the detectDataType property: Indicates whether type detection is enabled when reading the xml files. Type: boolean (or Expression with resultType boolean).

Parameters:

detectDataType - the detectDataType value to set.

Returns:

the XmlReadSettings object itself.

withNamespacePrefixes

public XmlReadSettings withNamespacePrefixes(Object namespacePrefixes)

Set the namespacePrefixes property: Namespace uri to prefix mappings to override the prefixes in column names when namespace is enabled, if no prefix is defined for a namespace uri, the prefix of xml element/attribute name in the xml data file will be used. Example: "{"http://www.example.com/xml":"prefix"}" Type: object (or Expression with resultType object).

Parameters:

namespacePrefixes - the namespacePrefixes value to set.

Returns:

the XmlReadSettings object itself.

withNamespaces

public XmlReadSettings withNamespaces(Object namespaces)

Set the namespaces property: Indicates whether namespace is enabled when reading the xml files. Type: boolean (or Expression with resultType boolean).

Parameters:

namespaces - the namespaces value to set.

Returns:

the XmlReadSettings object itself.

withValidationMode

public XmlReadSettings withValidationMode(Object validationMode)

Set the validationMode property: Indicates what validation method is used when reading the xml files. Allowed values: 'none', 'xsd', or 'dtd'. Type: string (or Expression with resultType string).

Parameters:

validationMode - the validationMode value to set.

Returns:

the XmlReadSettings object itself.

Applies to