Top Fields Constructors Methods
liquibase.parser.core.xml

public Class XMLChangeLogSAXParser

extends AbstractChangeLogParser
Class Inheritance
Imports
liquibase.GlobalConfiguration, .Scope, liquibase.changelog.ChangeLogParameters, liquibase.exception.ChangeLogParseException, liquibase.parser.core.ParsedNode, liquibase.resource.Resource, .ResourceAccessor, liquibase.util.BomAwareInputStream, .FileUtil, .LiquibaseUtil, org.xml.sax.*, javax.xml.XMLConstants, javax.xml.parsers.SAXParser, .SAXParserFactory, java.io.IOException, .InputStream

Field Summary

Modifier and TypeField and Description
public static final String
private final LiquibaseEntityResolver
private final SAXParserFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static String
public int
protected SAXParserFactory
public static String
protected ParsedNode
parseToNode(String physicalChangeLogLocation, ChangeLogParameters changeLogParameters, ResourceAccessor resourceAccessor)

Implements abstract liquibase.parser.core.xml.AbstractChangeLogParser.parseToNode.

public void
setShouldWarnOnMismatchedXsdVersion(boolean shouldWarnOnMismatchedXsdVersion)

When set to true, a warning will be printed to the console if the XSD version used does not match the version of Liquibase.

public boolean
supports(String
the location of the changelog file
changeLogFile
,
ResourceAccessor
the resource accessor
resourceAccessor
)

Implements liquibase.parser.ChangeLogParser.supports.

Checks if the file format is supported by an implementing ChangeLogParser and returns true if that is the case.

private void
trySetSchemaLanguageProperty(SAXParser
the parser to configure
parser
)

Attempts to set the "schemaLanguage" property of the given parser, but ignores any errors that may occur if the parser does not recognize this property.

Inherited from liquibase.parser.core.xml.AbstractChangeLogParser:
parse

Field Detail

LIQUIBASE_SCHEMA_VERSIONback to summary
public static final String LIQUIBASE_SCHEMA_VERSION
resolverback to summary
private final LiquibaseEntityResolver resolver
saxParserFactoryback to summary
private final SAXParserFactory saxParserFactory

Constructor Detail

XMLChangeLogSAXParserback to summary
public XMLChangeLogSAXParser()

Method Detail

computeSchemaVersionback to summary
pack-priv static String computeSchemaVersion(String version)
getPriorityback to summary
public int getPriority()

Implements liquibase.servicelocator.PrioritizedService.getPriority.

Annotations
@Override
getSaxParserFactoryback to summary
protected SAXParserFactory getSaxParserFactory()
getSchemaVersionback to summary
public static String getSchemaVersion()
parseToNodeback to summary
protected ParsedNode parseToNode(String physicalChangeLogLocation, ChangeLogParameters changeLogParameters, ResourceAccessor resourceAccessor) throws ChangeLogParseException

Implements abstract liquibase.parser.core.xml.AbstractChangeLogParser.parseToNode.

Annotations
@Override
setShouldWarnOnMismatchedXsdVersionback to summary
public void setShouldWarnOnMismatchedXsdVersion(boolean shouldWarnOnMismatchedXsdVersion)

When set to true, a warning will be printed to the console if the XSD version used does not match the version of Liquibase. If "latest" is used as the XSD version, no warning is printed.

supportsback to summary
public boolean supports(String changeLogFile, ResourceAccessor resourceAccessor)

Implements liquibase.parser.ChangeLogParser.supports.

Doc from liquibase.parser.ChangeLogParser.supports.

Checks if the file format is supported by an implementing ChangeLogParser and returns true if that is the case.

Parameters
changeLogFile:String

the location of the changelog file

resourceAccessor:ResourceAccessor

the resource accessor

Returns:boolean

true if the file format is supported, false if it is not.

Annotations
@Override
trySetSchemaLanguagePropertyback to summary
private void trySetSchemaLanguageProperty(SAXParser parser)

Attempts to set the "schemaLanguage" property of the given parser, but ignores any errors that may occur if the parser does not recognize this property.

Parameters
parser:SAXParser

the parser to configure