Project JXTA

net.jxta.document
Interface StructuredDocument

All Superinterfaces:
Document, Element
All Known Subinterfaces:
StructuredTextDocument, XMLDocument

public interface StructuredDocument
extends Document, Element

An extension of Document which allows the content of a document to be specified by a hierarchy of elements. This allows the content of many document types to be mainpulated in an abstract way without regard to the phyiscal representation of the documents.

StructuredDocuments are one of the elementary components that is manipulated by the JXTA core. StructuredDocuments are used to represent most core objects such as peer, peergroup or pipe advertisements.

See Also:
Document, StructuredTextDocument, StructuredDocumentFactory

Method Summary
 Element createElement(Object key)
          Create a new element without value
 Element createElement(Object key, Object value)
          Create a new element with value
 
Methods inherited from interface net.jxta.document.Document
getFileExtension, getMimeType, getStream, sendToStream
 
Methods inherited from interface net.jxta.document.Element
appendChild, getChildren, getChildren, getKey, getParent, getRoot, getValue
 

Method Detail

createElement

public Element createElement(Object key)
Create a new element without value

Parameters:
key - The key of the element to be created.
Returns:
The new element.

createElement

public Element createElement(Object key,
                             Object value)
Create a new element with value

Parameters:
key - The name of the element to be created.
value - The value of the element to be created or null if no value is desired.
Returns:
The new element.

JXTA J2SE