Package com.helger.xml.microdom
Class MicroDocument
java.lang.Object
com.helger.xml.microdom.AbstractMicroNode
com.helger.xml.microdom.AbstractMicroNodeWithChildren
com.helger.xml.microdom.MicroDocument
- All Implemented Interfaces:
com.helger.commons.hierarchy.IHasChildren<IMicroNode>,com.helger.commons.hierarchy.IHasChildrenRecursive<IMicroNode>,com.helger.commons.hierarchy.IHasChildrenSorted<IMicroNode>,com.helger.commons.hierarchy.IHasParent<IMicroNode>,com.helger.commons.lang.ICloneable<IMicroNode>,IMicroDocument,IMicroNode,IMicroNodeWithChildren
Default implementation of the
IMicroDocument interface.- Author:
- Philip Helger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.helger.commons.state.ETriState -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClone()com.helger.commons.state.ETriStategetType()booleanAs instances of this class may not implement equals/hashCode we need a way to determine, if 2 nodes are equal by content.protected voidonAppendChild(AbstractMicroNode aChildNode) Callback that is invoked once a child is to be appended.voidsetStandalone(com.helger.commons.state.ETriState eStandalone) Change the standalone state of this document.toString()Methods inherited from class com.helger.xml.microdom.AbstractMicroNodeWithChildren
containsAnyChild, directGetAllChildren, findFirstChild, findFirstChildMapped, forAllChildren, forAllChildren, forAllChildrenBreakable, forAllChildrenMapped, getAllChildren, getChildAtIndex, getChildCount, getChildren, getFirstChild, getLastChild, getTextContent, getTextContentWithConversion, hasChildren, onInsertAfter, onInsertAtIndex, onInsertBefore, onRemoveAllChildren, onRemoveChild, onRemoveChildAtIndexMethods inherited from class com.helger.xml.microdom.AbstractMicroNode
appendChild, detachFromParent, findParentElement, getAllEventTargets, getAllEventTargets, getNextSibling, getParent, getPreviousSibling, hasParent, insertAfter, insertAtIndex, insertBefore, internalResetParentNode, internalSetParentNode, internalTriggerEvent, isCDATA, isComment, isContainer, isDocument, isDocumentType, isElement, isEntityReference, isProcessingInstruction, isText, onEvent, registerEventTarget, removeAllChildren, removeChild, removeChildAtIndex, unregisterEventTargetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.hierarchy.IHasChildren
forAllChildren, forAllChildren, forAllChildrenBreakable, forAllChildrenMapped, getChildCount, getChildren, hasChildren, hasNoChildrenMethods inherited from interface com.helger.commons.hierarchy.IHasChildrenRecursive
forAllChildrenRecursive, forAllChildrenRecursiveMethods inherited from interface com.helger.commons.hierarchy.IHasChildrenSorted
findFirstChild, findFirstChildMapped, getChildAtIndexMethods inherited from interface com.helger.xml.microdom.IMicroDocument
isStandalone, setStandaloneMethods inherited from interface com.helger.xml.microdom.IMicroNode
appendCDATA, appendCDATA, appendCDATA, appendCDATAWithConversion, appendChild, appendChildren, appendChildren, appendComment, appendComment, appendComment, appendCommentWithConversion, appendContainer, appendElement, appendElement, appendEntityReference, appendIgnorableWhitespaceText, appendIgnorableWhitespaceText, appendIgnorableWhitespaceText, appendProcessingInstruction, appendText, appendText, appendText, appendText, appendText, appendText, appendTextWithConversion, containsAnyChild, detachFromParent, findParentElement, getAllChildren, getAllChildrenRecursive, getAllEventTargets, getAllEventTargets, getFirstChild, getLastChild, getNextSibling, getNodeValue, getParent, getParentElementWithName, getParentElementWithName, getPreviousSibling, hasParent, insertAfter, insertAtIndex, insertBefore, isCDATA, isComment, isContainer, isDocument, isDocumentType, isElement, isEntityReference, isProcessingInstruction, isText, registerEventTarget, removeAllChildren, removeChild, removeChildAtIndex, replaceChild, unregisterEventTargetMethods inherited from interface com.helger.xml.microdom.IMicroNodeWithChildren
getTextContent, getTextContentTrimmed, getTextContentWithConversion
-
Field Details
-
DEFAULT_STANDALONE
public static final com.helger.commons.state.ETriState DEFAULT_STANDALONE
-
-
Constructor Details
-
MicroDocument
public MicroDocument() -
MicroDocument
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceIMicroNode- Returns:
- The node type. Never
null.
-
getNodeName
- Specified by:
getNodeNamein interfaceIMicroNode- Returns:
- Just an abstract name that depends on the implementing class. For
IMicroElementnodes this is the same as the tag name.
-
onAppendChild
Description copied from class:AbstractMicroNodeCallback that is invoked once a child is to be appended.- Overrides:
onAppendChildin classAbstractMicroNodeWithChildren- Parameters:
aChildNode- The appended child node.
-
getStandalone
- Specified by:
getStandalonein interfaceIMicroDocument- Returns:
- The standalone value. Never
null.
-
setStandalone
Description copied from interface:IMicroDocumentChange the standalone state of this document.- Specified by:
setStandalonein interfaceIMicroDocument- Parameters:
eStandalone- The new value. May not benull.
-
getDocType
- Specified by:
getDocTypein interfaceIMicroDocument- Returns:
- May be
null.
-
getDocumentElement
- Specified by:
getDocumentElementin interfaceIMicroDocument- Returns:
- May be
null.
-
getClone
Description copied from interface:IMicroDocument- Specified by:
getClonein interfacecom.helger.commons.lang.ICloneable<IMicroNode>- Specified by:
getClonein interfaceIMicroDocument- Specified by:
getClonein interfaceIMicroNodeWithChildren
-
isEqualContent
Description copied from interface:IMicroNodeAs instances of this class may not implement equals/hashCode we need a way to determine, if 2 nodes are equal by content.- Specified by:
isEqualContentin interfaceIMicroNode- Overrides:
isEqualContentin classAbstractMicroNodeWithChildren- Parameters:
o- The node to compare to this.- Returns:
trueif the nodes are of the same type and the same content,falseotherwise.
-
toString
- Overrides:
toStringin classAbstractMicroNodeWithChildren
-