JXTA

net.jxta.document
Interface XMLDocument<X extends XMLElement<X>>

All Superinterfaces:
Attributable, Document, DocumentStreamIO, Element<X>, StructuredDocument<X>, StructuredTextDocument<X>, TextDocument, TextDocumentReaderIO, TextElement<X>, XMLElement<X>

public interface XMLDocument<X extends XMLElement<X>>
extends XMLElement<X>, StructuredTextDocument<X>

Common interfaces for all StructuredTextDocument which are implemented by XML Documents. Appropriate for advertisements and messages.


Method Summary
 X createElement(String name)
          Create a new element without value.
 X createElement(String name, String value)
          Create a new element with value.
 
Methods inherited from interface net.jxta.document.XMLElement
getRoot
 
Methods inherited from interface net.jxta.document.Attributable
addAttribute, addAttribute, getAttribute, getAttributes
 
Methods inherited from interface net.jxta.document.TextDocumentReaderIO
getReader, sendToWriter
 
Methods inherited from interface net.jxta.document.StructuredDocument
createElement, createElement
 
Methods inherited from interface net.jxta.document.Document
getFileExtension, getMimeType
 
Methods inherited from interface net.jxta.document.DocumentStreamIO
getStream, sendToStream
 
Methods inherited from interface net.jxta.document.TextElement
getChildren, getKey, getName, getTextValue, getValue
 
Methods inherited from interface net.jxta.document.Element
appendChild, getChildren, getChildren, getParent
 

Method Detail

createElement

X createElement(String name)
Create a new element without value.

Specified by:
createElement in interface StructuredTextDocument<X extends XMLElement<X>>
Parameters:
name - The name of the element to be created.
Returns:
The new element.

createElement

X createElement(String name,
                String value)
Create a new element with value.

Specified by:
createElement in interface StructuredTextDocument<X extends XMLElement<X>>
Parameters:
name - The name of the element to be created.
value - The value of the element to be created.
Returns:
The new element.

JXSE