OSFI-Java  3.9.2
OpenSF Integration Library
esa.opensf.osfi.xmlutils.DomUtils Class Reference

Static Public Member Functions

static boolean validateAgainst (final Node docOrEl, final String xsdFile)
 
static boolean validateAgainstInternalSchema (final Node docOrEl)
 
static List< Element > getChildElements (final Node node, final String name)
 

Detailed Description

Utility class with methods that work on DOM nodes, documents and elements.

Member Function Documentation

◆ getChildElements()

static List<Element> esa.opensf.osfi.xmlutils.DomUtils.getChildElements ( final Node  node,
final String  name 
)
static
Returns
List of all the direct children elements with the given tag name
Parameters
nodeNode whose direct children will be filtered
nameString that will be checked against the Node#getNodeName() value. If null, all direct child elements will be returned.

◆ validateAgainst()

static boolean esa.opensf.osfi.xmlutils.DomUtils.validateAgainst ( final Node  docOrEl,
final String  xsdFile 
)
static

Validate a document/element tree against an external XSD file.

Parameters
docOrElXML document or element to be validated
xsdFilePath to an XSD schema file
Returns
true if the validation succeeds, false otherwise.
Exceptions
IllegalArgumentExceptionif the schema cannot be loaded

◆ validateAgainstInternalSchema()

static boolean esa.opensf.osfi.xmlutils.DomUtils.validateAgainstInternalSchema ( final Node  docOrEl)
static

Validate a document/element tree against a XSD schema referenced in the XML itself.

Parameters
docOrElXML document or element to be validated
Returns
true if the validation succeeds, false otherwise.

The documentation for this class was generated from the following file: