|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.document.StructuredDocumentUtils
public final class StructuredDocumentUtils
Provides a number of static utility members which are helpful in manipluating StructuredDocuments.
Method Summary | |
---|---|
static StructuredDocument |
copyAsDocument(Element from)
Copies the specified element or document into a standalone document of same type. |
static void |
copyChildren(StructuredDocument intoDoc,
Element intoElement,
Element from)
Recursively copy children elements of from into the
the element intoElement of document intoDoc . |
static Element |
copyElements(StructuredDocument intoDoc,
Element intoElement,
Element from)
Recursively copy elements beginnging with from into the
document identified by intoDoc . |
static Element |
copyElements(StructuredDocument intoDoc,
Element intoElement,
Element from,
Object newName)
Recursively copy elements beginnging with from into the
document identified by intoDoc . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void copyChildren(StructuredDocument intoDoc, Element intoElement, Element from)
from
into the
the element intoElement
of document intoDoc
.
BEWARE that this does NOT copy the TEXTVALUE (if any) of the
fromParent
element, ONLY CHILDREN. All other elements
are fully copied, including their textValue.
It is not possible to copy a textValue in an existing element.
intoDoc
- the document into which the elements will be
copied.intoElement
- the element which will serve as the parent for
the elements being copied.from
- the parent element of the elements which will be copied.public static Element copyElements(StructuredDocument intoDoc, Element intoElement, Element from, Object newName)
from
into the
document identified by intoDoc
.
intoDoc
- the document into which the elements which will be
copied.intoElement
- the element which will serve as the parent for
the elements being copied.from
- the root element of the hierarchy which will be copied.newName
- the root element being copied is renamed
newName.
public static Element copyElements(StructuredDocument intoDoc, Element intoElement, Element from)
from
into the
document identified by intoDoc
.
intoDoc
- the document into which the elements which will be
copied.intoElement
- the element which will serve as the parent for
the elements being copied.from
- the root element of the hierarchy which will be copied.
public static StructuredDocument copyAsDocument(Element from)
from
from
- the root element from which to begin copying.
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |