xelem.3.0

nl.fountain.xelem.excel
Interface XLElement

All Known Subinterfaces:
AutoFilter, Cell, Column, Comment, DocumentProperties, ExcelWorkbook, NamedRange, Pane, Row, Table, Workbook, Worksheet, WorksheetOptions
All Known Implementing Classes:
AbstractXLElement, ODocumentProperties, SSCell, SSColumn, SSComment, SSNamedRange, SSRow, SSTable, SSWorksheet, XAutoFilter, XExcelWorkbook, XLWorkbook, XPane, XWorksheetOptions

public interface XLElement

Represents an element in SpreadsheetML.

XLElements are unaware of their parent. This makes it possible to move and duplicate them to other, allthough appropriate, XLElements of the Workbook. Even to other Workbooks.

An XLElement is capable of assembling it's state into an Element and attach this Element to a parent-element in a Document.


Field Summary
static String PREFIX_HTML
          HTML-namespace prefix: "html".
static String PREFIX_O
          The Office namespace prefix: "o".
static String PREFIX_SS
          The SpreadsheetML namespace prefix: "ss".
static String PREFIX_X
          The Excel namespace prefix: "x".
static String XMLNS
          The default SpreadsheetML namespace: "urn:schemas-microsoft-com:office:spreadsheet"
static String XMLNS_HTML
          HTML-namespace.
static String XMLNS_O
          The Office namespace.
static String XMLNS_SS
          The SpreadsheetML namespace.
static String XMLNS_X
          The Excel namespace.
 
Method Summary
 void addElementComment(String comment)
          Adds a comment to this XLElement.
 Element assemble(Element parent, GIO gio)
          Assembles the state of this XLElement and all of it's children into an Element.
 List getElementComments()
          Gets a List of added comments.
 String getNameSpace()
          Gets the namespace of this XLElement.
 String getPrefix()
          Gets the prefix of this XLElement.
 String getTagName()
          Gets the tagname (localName) of this XLElement.
 void setAttributes(Attributes attrs)
          Called by a builder during a read by ExcelReader.
 void setChildElement(String localName, String content)
          Called by a builder during a read by ExcelReader.
 

Field Detail

XMLNS

static final String XMLNS
The default SpreadsheetML namespace: "urn:schemas-microsoft-com:office:spreadsheet"

See Also:
Constant Field Values

XMLNS_O

static final String XMLNS_O
The Office namespace.

See Also:
Constant Field Values

XMLNS_X

static final String XMLNS_X
The Excel namespace.

See Also:
Constant Field Values

XMLNS_SS

static final String XMLNS_SS
The SpreadsheetML namespace.

See Also:
Constant Field Values

XMLNS_HTML

static final String XMLNS_HTML
HTML-namespace.

See Also:
Constant Field Values

PREFIX_O

static final String PREFIX_O
The Office namespace prefix: "o".

See Also:
Constant Field Values

PREFIX_X

static final String PREFIX_X
The Excel namespace prefix: "x".

See Also:
Constant Field Values

PREFIX_SS

static final String PREFIX_SS
The SpreadsheetML namespace prefix: "ss".

See Also:
Constant Field Values

PREFIX_HTML

static final String PREFIX_HTML
HTML-namespace prefix: "html".

See Also:
Constant Field Values
Method Detail

getTagName

String getTagName()
Gets the tagname (localName) of this XLElement.

Returns:
qualified name

getNameSpace

String getNameSpace()
Gets the namespace of this XLElement.

Returns:
namespace

getPrefix

String getPrefix()
Gets the prefix of this XLElement.

Returns:
prefix

addElementComment

void addElementComment(String comment)
Adds a comment to this XLElement.

Parameters:
comment - The string to be printed in xml as a comment to the element.
See Also:
Workbook.setPrintElementComments(boolean print)

getElementComments

List getElementComments()
Gets a List of added comments.

Returns:
List of Strings

assemble

Element assemble(Element parent,
                 GIO gio)
Assembles the state of this XLElement and all of it's children into an Element. Attaches the new element to it's parent-element if needed.

Parameters:
parent - the parent-element to which the new formed element will be appended
gio - a global information object
Returns:
the newly assembled element. may be null.

setAttributes

void setAttributes(Attributes attrs)
Called by a builder during a read by ExcelReader. Sets the (xml-)attributes found on the (xml-)element.

Parameters:
attrs - the attributes found on the element
Since:
xelem.2.0

setChildElement

void setChildElement(String localName,
                     String content)
Called by a builder during a read by ExcelReader. Sets a child element found on the (xml-)element.

Parameters:
localName - the local name of the child
content - the content of the child
Since:
xelem.2.0

xelem.3.0