Package org.n52.security.common.xml

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

See:
          Description

Interface Summary
DocumentBuilderPool Describes a pool for DocumentBuilders.
DocumentVisitor Encapsulates pieces of code processed while visiting a DOM tree.
XMLChunkHandler Processes XML chunks.
 

Class Summary
ClasspathEntityResolver Tries to load external entities from the classpath.
ClasspathLSResourceResolver Resolves resources based on the entity mapping file.
DefaultDocumentBuilderPool Implements a pool for document builders.
DocumentTraverser Traverses a DOM document and calls a DocumentVisitor for each traversed node.
DocumentVisitorAdapter Implements a DocumentVisitor and delegates the untyped visit(Node) methods to typed methods, like visit(Element).
DOMParser Encapsulates the common usage of the DocumentBuilder class within a helpful DOMParser class.
DOMParserOptions Options describing some common options for DOMParsers.
DOMSerializer Utility calls responsible for serializing xml documents to output streams.
DOMSerializerOptions Encapsulates settings for the DOMSerializer.
LSInputSourceAdapter Adapts the LSInput interface to the 'old' InputSource interface.
QuietEntityResolver Supresses the loading of entities in xml documents (like DTDs).
QuietErrorHandler Collects all errors thrown by a parser, but never rethrows them.
SimpleNamespaceContext Simple NamespaceContext implementation.
XMLBuilder Smart wrapper arround the Document.create* methods, which is desinged to support the creation of DOM structures within the source code.
XMLBuilder.XMLElement  
XMLChunk A chunk generated by XMLChunkIterator
XMLChunkHandlerAdapter Implements the XMLPartialStreamHandler interface with empty method stubs, so that subclasses only need to implement methods in which they are interested.
XMLChunkIterator Iterates over chunks of xml.
XMLChunkIterator.QNameMatcher Matches an element path, if the last element in the path matches a given qname.
XMLChunkReader Reads an xml document with an internal xml stream reader and as chunks and calls a subsets of XMLStreamChunkHandler instances.
XMLNamespaceAttributeDeclarationRemover This utility removes all xmlns attribute declarations from the dom, but preserves indirect referenced namespaces e.g.
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 Encapsulates context informations for xpath expressions.
XMLPrefixRemover Removes prefixes from the a dom tree.
 

Exception Summary
DOMParserException Wraps the thrown SAXParser and IOExeptions as RuntimeExeptions, so you can catch them in a higer level.
DOMSerializerException Wraps underlying transformer exceptions as runtime exceptions.
XMLPathException Wraps 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–2013 52north.org. All rights reserved.