Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jdom.adapters.* (8)org.jdom.filter.* (7)org.jdom.input.* (7)org.jdom.output.* (7)
org.jdom.transform.* (4)org.jdom.xpath.* (2)

org.jdom: Javadoc index of package org.jdom.


Package Samples:

org.jdom.adapters: Classes to represent the components of an XML document.  
org.jdom.filter: Classes to represent the components of an XML document.  
org.jdom.input: Classes to represent the components of an XML document.  
org.jdom.output: Classes to represent the components of an XML document.  
org.jdom.transform: Classes to represent the components of an XML document.  
org.jdom.xpath

Classes:

XMLOutputter: Outputs a JDOM document as a stream of bytes. The outputter can manage many styles of document formatting, from untouched to pretty printed. The default is to output the document content exactly as created, but this can be changed by setting a new Format object. For pretty-print output, use Format.getPrettyFormat() 55 . For whitespace-normalized output, use Format.getCompactFormat() 55 . There are output(...) 55 methods to print any of the standard JDOM classes, including Document and Element, to either a Writer or an OutputStream. Warning : When outputting to a Writer, make sure the writer's encoding ...
XSLTransformer: A convenience class to handle simple transformations. The JAXP TrAX classes have more bells and whistles and can be used with JDOMSource and JDOMResult for advanced uses. This class handles the common case and presents a simple interface. XSLTransformer is thread safe and may be used from multiple threads. XSLTransformer transformer = new XSLTransformer("file.xsl"); Document x2 = transformer.transform(x); // x is a Document Document y2 = transformer.transform(y); // y is a Document JDOM relies on TrAX to perform the transformation. The javax.xml.transform.TransformerFactory Java system property ...
JDOMResult: A holder for an XSL Transformation result, generally a list of nodes although it can be a JDOM Document also. As stated by the XSLT 1.0 specification, the result tree generated by an XSL transformation is not required to be a well-formed XML document. The result tree may have "any sequence of nodes as children that would be possible for an element node". The following example shows how to apply an XSL Transformation to a JDOM document and get the transformation result in the form of a list of JDOM nodes: public static List transform(Document doc, String stylesheet) throws JDOMException { try { ...
JDOMSource: A holder for an XML Transformation source: a Document, Element, or list of nodes. The is provides input to a JAXP TrAX Transformer . The following example shows how to apply an XSL Transformation to a JDOM document and get the transformation result in the form of a list of JDOM nodes: public static List transform(Document doc, String stylesheet) throws JDOMException { try { Transformer transformer = TransformerFactory.newInstance() .newTransformer(new StreamSource(stylesheet)); JDOMSource in = new JDOMSource(doc); JDOMResult out = new JDOMResult(); transformer.transform(in, out); return out.getResult(); ...
SAXOutputter: Outputs a JDOM document as a stream of SAX2 events. Most ContentHandler callbacks are supported. Both ignorableWhitespace() and skippedEntity() have not been implemented. The JDOMLocator class returned by getLocator() 55 exposes the current node being operated upon. At this time, it is not possible to access notations and unparsed entity references in a DTD from JDOM. Therefore, DTDHandler callbacks have not been implemented yet. The ErrorHandler callbacks have not been implemented, since these are supposed to be invoked when the document is parsed and at this point the document exists in memory ...
ContentFilter: A general purpose Filter able to represent all legal JDOM objects or a specific subset. Filtering is accomplished by way of a filtering mask in which each bit represents whether a JDOM object is visible or not. For example to view all Text and CDATA nodes in the content of element x. Filter filter = new ContentFilter(ContentFilter.TEXT | ContentFilter.CDATA); List content = x.getContent(filter); For those who don't like bit-masking, set methods are provided as an alternative. For example to allow everything except Comment nodes. Filter filter = new ContentFilter(); filter.setCommentVisible(false); ...
SAXBuilder: Builds a JDOM document from files, streams, readers, URLs, or a SAX org.xml.sax.InputSource instance using a SAX parser. The builder uses a third-party SAX parser (chosen by JAXP by default, or you can choose manually) to handle the parsing duties and simply listens to the SAX events to construct a document. Details which SAX does not provide, such as whitespace outside the root element, are not represented in the JDOM document. Information about SAX can be found at http://www.saxproject.org . Known issues: Relative paths for a org.jdom.DocType or org.jdom.EntityRef may be converted by the SAX ...
TextBuffer: A non-public utility class similar to StringBuffer but optimized for XML parsing where the common case is that you get only one chunk of characters per text section. TextBuffer stores the first chunk of characters in a String, which can just be returned directly if no second chunk is received. Subsequent chunks are stored in a supplemental char array (like StringBuffer uses). In this case, the returned text will be the first String chunk, concatenated with the subsequent chunks stored in the char array. This provides optimal performance in the common case, while still providing very good performance ...
Format: Class to encapsulate XMLOutputter format options. Typical users can use the standard format configurations obtained by getRawFormat() 55 (no whitespace changes), getPrettyFormat() 55 (whitespace beautification), and getCompactFormat() 55 (whitespace normalization). Several modes are available to effect the way textual content is printed. See the documentation for Format.TextMode for details.
XPath: A utility class for performing XPath calls on JDOM nodes, with a factory interface for obtaining a first XPath instance. Users operate against this class while XPath vendors can plug-in implementations underneath. Users can choose an implementation using either setXPathClass(java.lang.Class) 55 or the system property "org.jdom.xpath.class".
CDATA: An XML CDATA section. Represents character-based content within an XML document that should be output within special CDATA tags. Semantically it's identical to a simple Text object, but output behavior is different. CDATA makes no guarantees about the underlying textual representation of character data, but does expose that data as a Java String.
Namespace: An XML namespace representation, as well as a factory for creating XML namespace objects. Namespaces are not Serializable, however objects that use namespaces have special logic to handle serialization manually. These classes call the getNamespace() method on deserialization to ensure there is one unique Namespace object for any unique prefix/uri pair.
UncheckedJDOMFactory: Special factory for building documents without any content or structure checking. This should only be used when you are 100% positive that the input is absolutely correct. This factory can speed builds, but any problems in the input will be uncaught until later when they could cause infinite loops, malformed XML, or worse. Use with extreme caution.
DOMBuilder: Builds a JDOM org.jdom.Document from a pre-existing DOM org.w3c.dom.Document . Also handy for testing builds from files to sanity check SAXBuilder .
JDOMException: The top level exception that JDOM classes can throw. Its subclasses add specificity to the problems that can occur using JDOM. This single exception can be caught to handle all JDOM specific problems (some methods may throw java.io.IOException and such).
DOMAdapter: Defines a standard set of adapter methods for interfacing with a DOM parser and obtaining a DOM org.w3c.dom.Document object. Implementing classes map these calls to DOM parser-specific calls, allowing any third-party parser to be used with JDOM.
NamespaceStack: Our own null subclass of NamespaceStack. This plays a little trick with Java access protection. We want subclasses of XMLOutputter to be able to override protected methods that declare a NamespaceStack parameter, but we don't want to declare the parent NamespaceStack class as public.
JDOMFactory: An interface to be used by builders when constructing JDOM objects. The DefaultJDOMFactory creates the standard top-level JDOM classes (Element, Document, Comment, etc). Another implementation of this factory could be used to create custom classes.
ProcessingInstruction: An XML processing instruction. Methods allow the user to obtain the target of the PI as well as its data. The data can always be accessed as a String or, if the data appears akin to an attribute list, can be retrieved as name/value pairs.
Text: Character-based XML content. Provides a modular, parentable method of representing text. Text makes no guarantees about the underlying textual representation of character data, but does expose that data as a Java String.
IllegalTargetException: Thrown when a target is supplied in construction of a JDOM ProcessingInstruction , and that name breaks XML naming conventions.
DataConversionException: Thrown when a data conversion from a string to value type fails, such as can happen with the Attribute convenience getter functions.

Home | Contact Us | Privacy Policy | Terms of Service