Package org.n52.security.common.xml

The XML package contains utiltiy and helper classes for xml processing. See:
          Description

Interface Summary
DocumentBuilderPool Interface DocumentBuilderPool describes a pool for DocumentBuilders.
DocumentVisitor A DocumentVisitor encapsulates pices of code processed during visiting a dom tree.
XMLChunkHandler Interface XMLChunkHandler processes xml chunks.
 

Class Summary
ClasspathEntityResolver Class ClasspathEntityResolver tries to load external entities from the classpath.
ClasspathLSResourceResolver Class ClasspathLSResourceResolver resolves resources based on the entity-mapping file.
DefaultDocumentBuilderPool Class DocumentBuilderPool implements a pool for document builders.
DocumentTraverser Class DocumentTraverser is able to traverse a dom document and calls a DocumentVisitor for each traversed node.
DocumentVisitorAdapter Class DocumentVisitorAdapter implements a DocumentVisitor and delegates the untyped visit(Node) methods to typed methods, like visit(Element).
DOMParser Class DOMParser encapsulates the common usage of the DocumentBuilder class within a this helpfull DOMParser class.
DOMParserOptions Class DOMParserOptions are options describing some common options for DOMParsers.
DOMSerializer Class DOMSerializer is a small utility calls responsible for serializing xml documents to output streams.
DOMSerializerOptions Class DOMSerializerOptions encapsulates settings for the DOMSerializer.
LSInputSourceAdapter Class LSInputSourceAdapter adapts the LSInput interface to the 'old' InputSource interface.
QuietEntityResolver Class QuietEntityResolver supresses the loading of entities in xml documents (like dtds).
QuietErrorHandler Class QuietErrorHandler collects all errors thrown by a parser, but never rethrow it.
SimpleNamespaceContext Class SimpleNamespaceContext is a simple NamespaceContext implementation.
XMLChunkHandlerAdapter Class XMLPartialStreamHandlerAdapter implements the XMLPartialStreamHandler interface, with empty method stubs, so that subclasses only need to implement methods in which they are interested.
XMLChunkReader Class XMLStreamChunkReader reads an xml document with an internal xml stream reader and as chunks and calls a subsets of XMLStreamChunkHandler instances.
XMLPath Class XMLPath represents an XPath and it's evaluation.
XMLPath.BooleanXMLPath Class BooleanXMLPath, represents xpath queries resulting in boolean values.
XMLPath.NodeSetXMLPath Class NodeSetXMLPath, represents xpaths resulting in NodeLists.
XMLPath.NodeXMLPath Class NodeXMLPath, represents xpaths resulting in nodes.
XMLPath.NumberXMLPath Class NumberXMLPath, represents xpath queries resulting in number values.
XMLPath.SourceXMLPath Class SourceXMLPath, represents the xpath root/or source of evaluation.
XMLPath.StringXMLPath Class StringXMLPath, represents xpaths queries resulting in string values.
XMLPathCtx Class XMLPathCtx encapsulates context informations for xpath expressions.
XMLPrefixRemover Class XMLPrefixRemover removes prefixes from the a dom tree.
 

Exception Summary
DOMParserException Class DOMParserException wrapps the thrown SAXParser and IOExeptions as Runtimeexeptions, thow you can catch them in a higer stack.
DOMSerializerException Class DOMSerializerException wrapps underlying transformer exceptions as runtime exceptions.
XMLPathException Class XMLPathException wrapps underlying XPathExceptions exceptions as runtime exceptions.
 

Package org.n52.security.common.xml Description

The XML package contains utiltiy and helper classes for xml processing.

Package Specification

DOM Parsing

Please use the DOMParser class to parse xml documents as DOM.
This class is a performance optimized wrapper arround the DocumentBuilderFactory and it's settings.

DOM Serialization

Please use the DOMSerializer to write a DOM-Document to a outputstream.
The class is a performance optimized wrapper arround the TransformerFactory class and it's settings.

XPath

To make xpath expressions with namespaces use the SimpleNamespaceContext class to link prefixes to namespaces.

XML Chunk Reading

To parse very large xml documents use the XMLChunkReader and implement own XMLChunkHandler.

DOM Traversing / Visiting

With the class DocumentTraverser you can let implementations of DocumentVisitors visit a DOM-Tree.
This is a external implementation of the Visitor-Pattern for XMLDocuments, which offers great flexiblity for processing of DOM trees. You can implement simple DocumentVisitors by extending the DocumentVistorAdapter class.

XML Helper

The classes

are helpers for common xml use cases.



Copyright © 2004-2009 52north.org. All Rights Reserved.