public class IlvXMLSettings extends IlvSettings
IlvXMLSettings
class provides several
methods for initializing XML settings from XML streams:readSettings(String)
to read the settings from an XML file.readSettings(Reader)
to read the settings from an XML stream.readSettings(java.net.URL)
to read the settings from a file URL.setDocument(Document)
to associate XML settings with a specified DOM document.<?xml version="1.0" ?> <appframe> <settings> ... < Root settings elements > ... </settings> </appframe>Root settings elements can be settings elements that initialize either Java Application Framework components or user components. For example, the
"options.xml"
file below initializes both an
IlvToolBar
and some user application options:
<?xml version="1.0" ?> <appframe> <settings> <toolbar name="default"> <button actionCommand="OpenDocument"> <button actionCommand="SaveDocument"> </toolbar> <options textEditor="c:\temp\textEditor.exe"> <save> autoRecover="20" createBackupCopies="true" </save> </options> </settings> </appframe>User application options can be retrieved as shown below:
IlvApplication application = new IlvApplication(); ... application.addXMLSettings("options.xml"; application.initialize(); ... IlvSettingsElement optionsElmt = application.selectElement("options"); String editor = optionsElmt.getString("textEditor", null); IlvSettingsElement saveOptionsElmt = options.getFirstChild("save"); int autoRecover = saveOptionsElmt.getInt("autoRecover", 10); boolean createBackup = saveOptionsElmt.getBoolean("createBackupCopies", true);You can find task-oriented documentation and examples of using XML settings in the Perforce JViews Application Framework User's Manual, in the section on Settings.
IlvSettings.AttributeID, IlvSettings.IDAttributeMapper, IlvSettings.IDResolver
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_PARSE_TEXT
Constant value that determines if XML settings should automatically
set the text of parsed DOM elements to specific attributes.
|
static String |
DEFAULT_TAG_TEXT_ATTRIBUTE
Default name for attributes that store the text of DOM elements
parsed for XML settings.
|
APPLY_DIFF_MODE, EVERY_NODE_KEY, READABLE, SET_MODE, UNREADABLE, VERBOSE, WRITABLE
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Constructor and Description |
---|
IlvXMLSettings()
Constructs a new
IlvXMLSettings . |
IlvXMLSettings(String name)
Constructs a new
IlvXMLSettings with the specified name. |
Modifier and Type | Method and Description |
---|---|
Node |
appendChild(Node newChild)
Adds the node
newChild to the end of the list of children
of this node. |
Node |
cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy
constructor for nodes.
|
void |
commit()
Commits the content of the settings to the same stream as
specified with the method
readSettings(URL) |
Attr |
createAttribute(String name)
Creates an
Attr of the given name. |
Attr |
createAttributeNS(String namespaceURI,
String qualifiedName)
Creates an attribute of the given qualified name and namespace URI.
|
CDATASection |
createCDATASection(String data)
Creates a
CDATASection node whose value is the specified
string. |
Comment |
createComment(String data)
Creates a
Comment node given the specified string. |
DocumentFragment |
createDocumentFragment()
Creates an empty
DocumentFragment object. |
Element |
createElement(String tagName)
Creates an element of the type specified.
|
Element |
createElementNS(String namespaceURI,
String qualifiedName)
Creates an element of the given qualified name and namespace URI.
|
EntityReference |
createEntityReference(String name)
Creates an
EntityReference object. |
protected IlvSettingsModel |
createModel(short accessRights)
Creates an empty
DOM model. |
ProcessingInstruction |
createProcessingInstruction(String target,
String data)
Creates a
ProcessingInstruction node given the specified
name and data strings. |
Text |
createTextNode(String data)
Creates a
Text node given the specified string. |
NodeList |
getChildNodes()
A
NodeList that contains all children of this node. |
DocumentType |
getDoctype()
The Document Type Declaration (see
DocumentType )
associated with this document. |
Document |
getDocument()
Returns the DOM document that corresponds to the XML source
specified to the XML settings.
|
Element |
getDocumentElement()
Returns the document element of the
Document
associated with these settings. |
Element |
getElementById(String elementId)
Returns the
Element whose ID is given by
elementId . |
NodeList |
getElementsByTagName(String tagname)
Returns a
NodeList of all the Elements with a
given tag name in the order in which they are encountered in a
preorder traversal of the Document tree. |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
Returns a
NodeList of all the Elements with a
given local name and namespace URI in the order in which they are
encountered in a preorder traversal of the Document tree. |
Node |
getFirstChild()
The first child of this node.
|
DOMImplementation |
getImplementation()
The
DOMImplementation object that handles this document. |
Node |
getLastChild()
The last child of this node.
|
static String |
GetLocalName(Node node)
Returns the local name of the specified
node . |
String |
getSettingsRootPath()
Returns the XPath expression that selects the root element
for the XML settings.
|
String |
getTagTextAttributeName()
Returns the value set with the
setTagTextAttributeName(java.lang.String) method
or DEFAULT_TAG_TEXT_ATTRIBUTE if this method has not been
used. |
URL |
getXMLFileURL()
Returns the URL specified with
setXMLFileURL(java.net.URL) . |
boolean |
hasChildNodes()
Determines whether the document associated with these settings
has child nodes.
|
Node |
importNode(Node importedNode,
boolean deep)
Imports a node from another document to this document.
|
Node |
insertBefore(Node newChild,
Node refChild)
Inserts the node
newChild before the existing child node
refChild . |
boolean |
isSupported(String feature,
String version)
Tests whether the DOM implementation of the
Document
associated with these settings implements a specific feature and
that feature is supported by this node. |
void |
newDocument()
Initializes the XML settings as a new DOM document.
|
void |
normalize()
Puts all
Text nodes in the full depth of the sub-tree
underneath this Node . |
boolean |
readSettings(Reader reader)
Reads the settings from the specified
reader . |
boolean |
readSettings(String systemID)
Reads the settings from the specified file name.
|
boolean |
readSettings(URL url)
Reads the settings from the specified file
url . |
Node |
removeChild(Node oldChild)
Removes the child node indicated by
oldChild from the list
of children, and returns it. |
Node |
replaceChild(Node newChild,
Node oldChild)
Replaces the child node
oldChild with newChild
in the list of children, and returns the oldChild node. |
void |
setCascadingMode(short mode)
Sets the cascading mode of the XML settings with other settings.
|
boolean |
setDocument(Document document)
Sets the specified DOM document to the XML settings.
|
void |
setParseTextNodes(boolean parse)
Determines whether the text of DOM elements that are parsed
by the settings should automatically set to a new attribute, the name
of which is returned by
getTagTextAttributeName() . |
boolean |
setRootElement(Element rootElement)
Sets the specified DOM element as the new root of
elements accessed through the XML settings.
|
void |
setSettingsRootPath(String rootPath)
Sets the XPath expression that selects the root element
for the XML settings.
|
void |
setTagTextAttributeName(String tagTextAttribute)
Specifies the name of the attribute that contains the
text of DOM elements.
|
void |
setXMLFileURL(URL url)
Sets an XML file that will provide settings data for the settings.
|
void |
writeSettings(URL url)
Changes the file URL that the XML settings access and save the settings
in.
|
boolean |
writeSettingsIn(OutputStream output)
Writes the settings in the specified
output stream. |
boolean |
writeSettingsIn(URL url)
Writes the XML settings in the file with the specified
url . |
addIDResolver, addSettingsElement, adoptNode, areSettingsInitialized, canWrite, compareDocumentPosition, createSettingsElement, ensureCorrespondingElement, ensureSettingsElement, ensureSettingsElement, getAccessRights, getApplication, getAttributes, getBaseURI, getCascadingMode, getDocumentURI, getDomConfig, getFeature, getID, getID, getInputEncoding, getLocalName, getModel, getMutableModel, getName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSettingsManager, getStrictErrorChecking, getTextContent, getUserData, getXmlEncoding, getXmlStandalone, getXmlVersion, hasAttributes, initializeSettings, isDefaultNamespace, isEqualNode, IsEveryNodeKey, isSameNode, lookupNamespaceURI, lookupPrefix, normalizeDocument, removeAllSettingsElements, removeIDResolver, removeSettingsElement, renameNode, select, select, select, selectElement, selectElement, selectElement, selectNodes, setAccessRights, setApplication, setDocumentURI, setID, setModel, setName, setNodeValue, setPrefix, setSettingsManager, setStrictErrorChecking, setTextContent, setUserData, setXmlStandalone, setXmlVersion
public static String DEFAULT_TAG_TEXT_ATTRIBUTE
DEFAULT_PARSE_TEXT
public static boolean DEFAULT_PARSE_TEXT
DEFAULT_TAG_TEXT_ATTRIBUTE
public IlvXMLSettings()
IlvXMLSettings
.public IlvXMLSettings(String name)
IlvXMLSettings
with the specified name.name
- The name of this settings source.public boolean readSettings(String systemID)
systemID
- The file name to read the settings from.true
if the settings could be read; false
otherwise.public boolean readSettings(Reader reader)
reader
.reader
- The reader to read the settings from.true
if the settings could be read; false
otherwise.public boolean readSettings(URL url)
url
.url
- The URL to read the settings from.true
if the settings could be read; false
otherwise.public void setCascadingMode(short mode)
setCascadingMode
in class IlvSettings
mode
- The new cascading mode. Can be one of the following values:
IlvSettings.getCascadingMode()
public boolean setDocument(Document document)
document
- The new DOM document associated with the XML settings.true
if the specified document is valid and if the
settings root path can select an element in the new document;
false
otherwise.public void newDocument()
public boolean setRootElement(Element rootElement)
rootElement
- The new DOM root element of the
XML settings.true
if the initialization of the XML settings
succeeds using the new root element; false
otherwise.public void setXMLFileURL(URL url)
readSettings(URL)
method. It allows
for initializing the XML settings using bean properties.url
- The URL of the XML file to read settings from.getXMLFileURL()
public URL getXMLFileURL()
setXMLFileURL(java.net.URL)
.setXMLFileURL(java.net.URL)
public String getSettingsRootPath()
/appframe/settings
.setSettingsRootPath(java.lang.String)
public void setSettingsRootPath(String rootPath)
rootPath
- The XPath to locate the settings root element.getSettingsRootPath()
public Document getDocument()
null
if the XML
source specified to the settings cannot be read.public void commit()
readSettings(URL)
commit
in class IlvSettings
readSettings(URL)
public void writeSettings(URL url)
commit()
,
writeSettingsIn(URL)
public boolean writeSettingsIn(URL url)
url
.
Using this method does not change the current XML stream accessed by the
settings.true
if the settings can be saved or
false
if an error occurs.writeSettingsIn(OutputStream)
,
writeSettings(java.net.URL)
public boolean writeSettingsIn(OutputStream output)
output
stream.
Using this method does not change the current XML stream accessed by the
settings.true
if the settings can be saved or
false
if an error occurs.public String getTagTextAttributeName()
setTagTextAttributeName(java.lang.String)
method
or DEFAULT_TAG_TEXT_ATTRIBUTE
if this method has not been
used.DEFAULT_TAG_TEXT_ATTRIBUTE
public void setTagTextAttributeName(String tagTextAttribute)
tagTextAttribute
- The name of the attribute.setParseTextNodes(boolean)
public void setParseTextNodes(boolean parse)
getTagTextAttributeName()
.protected IlvSettingsModel createModel(short accessRights)
DOM
model.createModel
in class IlvSettings
accessRights
- The type of access that this model is required for. If
(accessRigths & WRITABLE) != 0
or if the model is intended to
be accessed in Write mode, it has to implement the
IlvMutableSettingsModel
interface.null
is returnedpublic static String GetLocalName(Node node)
node
.public DocumentType getDoctype()
DocumentType
)
associated with this document. For HTML documents as well as XML
documents without a document type declaration this returns
null
. The DOM Level 2 does not support editing the
Document Type Declaration. docType
cannot be altered in
any way, including through the use of methods inherited from the
Node
interface, such as insertNode
or
removeNode
.
Document
associated with these settings.
This document is accessible with the method getDocument()
.getDoctype
in interface Document
getDoctype
in class IlvSettings
null
.
It is overridden by the
IlvXMLSettings
class to
return the document type of the associated DOM document.getDoctype()
public DOMImplementation getImplementation()
DOMImplementation
object that handles this document. A
DOM application may use objects from multiple implementations.
Document
associated with these settings.
This document is accessible with the method getDocument()
.getImplementation
in interface Document
getImplementation
in class IlvSettings
null
.
It is overridden by the
IlvXMLSettings
class to
return the document implementation of the associated DOM document.getImplementation()
public Element getDocumentElement()
Document
associated with these settings. This document is accessible with the
method getDocument()
.getDocumentElement
in interface Document
getDocumentElement
in class IlvSettings
getDocumentElement()
public Element createElement(String tagName) throws DOMException
Element
interface, so attributes
can be specified directly on the returned object.
Attr
nodes representing them are automatically created
and attached to the element.
createElementNS(java.lang.String, java.lang.String)
method.
Document
associated with these settings.
This document is accessible with the method getDocument()
.createElement
in interface Document
createElement
in class IlvSettings
tagName
- The name of the element type to instantiate. For XML,
this is case-sensitive. For HTML, the tagName
parameter may be provided in any case, but it must be mapped to the
canonical uppercase form by the DOM implementation.Element
object with the
nodeName
attribute set to tagName
, and
localName
, prefix
, and
namespaceURI
set to null
.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.IlvSettings.createSettingsElement(java.lang.String)
public DocumentFragment createDocumentFragment()
DocumentFragment
object.
Document
associated
with these settings.
This document is accessible with the method getDocument()
.createDocumentFragment
in interface Document
createDocumentFragment
in class IlvSettings
DocumentFragment
.createDocumentFragment()
public Text createTextNode(String data)
Text
node given the specified string.
Text
node to the Document
associated
with these settings.
This document is accessible with the method getDocument()
.createTextNode
in interface Document
createTextNode
in class IlvSettings
data
- The data for the node.Text
object.createTextNode(java.lang.String)
public Comment createComment(String data)
Comment
node given the specified string.
Comment
to the Document
associated
with these settings.
This document is accessible with the method getDocument()
.createComment
in interface Document
createComment
in class IlvSettings
data
- The data for the node.Comment
object.createComment(java.lang.String)
public CDATASection createCDATASection(String data) throws DOMException
CDATASection
node whose value is the specified
string.
CDATASection
to the Document
associated
with these settings.
This document is accessible with the method getDocument()
.createCDATASection
in interface Document
createCDATASection
in class IlvSettings
data
- The data for the CDATASection
contents.CDATASection
object.DOMException
- NOT_SUPPORTED_ERR: Raised if this document is an HTML document.createCDATASection(java.lang.String)
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
ProcessingInstruction
node given the specified
name and data strings.
ProcessingInstruction
to the Document
associated with these settings.
This document is accessible with the method getDocument()
.createProcessingInstruction
in interface Document
createProcessingInstruction
in class IlvSettings
target
- The target part of the processing instruction.data
- The data for the node.ProcessingInstruction
object.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified target contains an
illegal character.
createProcessingInstruction(java.lang.String, java.lang.String)
public Attr createAttribute(String name) throws DOMException
Attr
of the given name. Note that the
Attr
instance can then be set on an Element
using the setAttributeNode
method.
createAttributeNS(java.lang.String, java.lang.String)
method.
Document
associated with these settings.
This document is accessible with the method getDocument()
.createAttribute
in interface Document
createAttribute
in class IlvSettings
name
- The name of the attribute.Attr
object with the nodeName
attribute set to name
, and localName
,
prefix
, and namespaceURI
set to
null
. The value of the attribute is the empty string.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.createAttribute(java.lang.String)
public EntityReference createEntityReference(String name) throws DOMException
EntityReference
object. In addition, if the
referenced entity is known, the child list of the
EntityReference
node is made the same as that of the
corresponding Entity
node.If any descendant of the
Entity
node has an unbound namespace prefix, the
corresponding descendant of the created EntityReference
node is also unbound; (its namespaceURI
is
null
). The DOM Level 2 does not support any mechanism to
resolve namespace prefixes.
EntityReference
to the Document
associated with these settings.
This document is accessible with the method getDocument()
.createEntityReference
in interface Document
createEntityReference
in class IlvSettings
name
- The name of the entity to reference.EntityReference
object.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.
createEntityReference(java.lang.String)
public NodeList getElementsByTagName(String tagname)
NodeList
of all the Elements
with a
given tag name in the order in which they are encountered in a
preorder traversal of the Document
tree.
Document
associated with these settings.
This document is accessible with the method getDocument()
.getElementsByTagName
in interface Document
getElementsByTagName
in class IlvSettings
tagname
- The name of the tag to match on. The special value "*"
matches all tags.NodeList
object containing all the matched
Elements
.public Node importNode(Node importedNode, boolean deep) throws DOMException
Document
associated with these settings.
This document is accessible with the method getDocument()
.
Document.importNode(org.w3c.dom.Node, boolean)
.importNode
in interface Document
importNode
in class IlvSettings
importedNode
- The node to import.deep
- If true
, recursively import the subtree under
the specified node; if false
, import only the node
itself, as explained above. This has no effect on Attr
, EntityReference
, and Notation
nodes.Document
.DOMException
- NOT_SUPPORTED_ERR: Raised if the type of node being imported is not
supported.importNode(org.w3c.dom.Node, boolean)
public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException
Document
associated with these settings.
This document is accessible with the method getDocument()
.createElementNS
in interface Document
createElementNS
in class IlvSettings
namespaceURI
- The namespace URI of the element to create.qualifiedName
- The qualified name of the element type to
instantiate.Element
object with the following
attributes:AttributeValueNode.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted
from qualifiedName
, or null
if there is
no prefixNode.localName
local name, extracted from
qualifiedName
Element.tagName
qualifiedName
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
qualifiedName
is
malformed, if the qualifiedName
has a prefix and the
namespaceURI
is null
, or if the
qualifiedName
has a prefix that is "xml" and the
namespaceURI
is different from "
http://www.w3.org/XML/1998/namespace" .public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
Document
associated with these settings.
This document is accessible with the method getDocument()
.createAttributeNS
in interface Document
createAttributeNS
in class IlvSettings
namespaceURI
- The namespace URI of the attribute to create.qualifiedName
- The qualified name of the attribute to instantiate.Attr
object with the following attributes:
AttributeValueNode.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted from
qualifiedName
, or null
if there is no
prefixNode.localName
local name, extracted from
qualifiedName
Attr.name
qualifiedName
Node.nodeValue
the empty
stringDOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
qualifiedName
is
malformed, if the qualifiedName
has a prefix and the
namespaceURI
is null
, if the
qualifiedName
has a prefix that is "xml" and the
namespaceURI
is different from "
http://www.w3.org/XML/1998/namespace", or if the
qualifiedName
is "xmlns" and the
namespaceURI
is different from "
http://www.w3.org/2000/xmlns/".public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
NodeList
of all the Elements
with a
given local name and namespace URI in the order in which they are
encountered in a preorder traversal of the Document
tree.
Document
associated with these
settings.
This document is accessible with the method getDocument()
.getElementsByTagNameNS
in interface Document
getElementsByTagNameNS
in class IlvSettings
namespaceURI
- The namespace URI of the elements to match on. The
special value "*" matches all namespaces.localName
- The local name of the elements to match on. The
special value "*" matches all local names.NodeList
object containing all the matched
Elements
.public Element getElementById(String elementId)
Element
whose ID
is given by
elementId
. If no such element exists, returns
null
.
Document
associated with these settings.
This document is accessible with the method getDocument()
.
Document.getElementById(java.lang.String)
.getElementById
in interface Document
getElementById
in class IlvSettings
elementId
- The unique id
value for an element.getElementById(java.lang.String)
public NodeList getChildNodes()
NodeList
that contains all children of this node. If
there are no children, this is a NodeList
containing no
nodes.
Document
associated with these settings.
This document is accessible with the method getDocument()
.getChildNodes
in interface Node
getChildNodes
in class IlvSettings
IlvSettings.select(java.lang.String, ilog.views.appframe.settings.IlvSettingsElement[])
with null
as the two parameters.public Node getFirstChild()
null
.
Document
associated with these settings.
This document is accessible with the method getDocument()
.getFirstChild
in interface Node
getFirstChild
in class IlvSettings
IlvSettings.getChildNodes()
public Node getLastChild()
null
.
Document
associated with these settings.
This document is accessible with the method getDocument()
.getLastChild
in interface Node
getLastChild
in class IlvSettings
public Node insertBefore(Node newChild, Node refChild) throws DOMException
newChild
before the existing child node
refChild
. If refChild
is null
,
insert newChild
at the end of the list of children.
newChild
is a DocumentFragment
object,
all of its children are inserted, in the same order, before
refChild
. If the newChild
is already in the
tree, it is first removed.insertBefore
in interface Node
insertBefore
in class IlvSettings
newChild
- The node to insert.refChild
- The reference node, i.e., the node before which the new
node must be inserted.DOMException
- HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild
node, or if
the node to insert is one of this node's ancestors.
newChild
was created
from a different document than the one that created this node.
refChild
is not a child of
this node.public Node replaceChild(Node newChild, Node oldChild) throws DOMException
oldChild
with newChild
in the list of children, and returns the oldChild
node.
Document
associated with these settings.
This document is accessible with the method getDocument()
.
Node.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)
.replaceChild
in interface Node
replaceChild
in class IlvSettings
newChild
- The new node to put in the child list.oldChild
- The node being replaced in the list.DOMException
- HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild
node, or if
the node to put in is one of this node's ancestors.
newChild
was created
from a different document than the one that created this node.
oldChild
is not a child of
this node.public Node removeChild(Node oldChild) throws DOMException
oldChild
from the list
of children, and returns it.
Document
associated with these settings.
This document is accessible with the method getDocument()
.removeChild
in interface Node
removeChild
in class IlvSettings
oldChild
- The node being removed.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
oldChild
is not a child of
this node.public Node appendChild(Node newChild) throws DOMException
newChild
to the end of the list of children
of this node. If the newChild
is already in the tree, it
is first removed.
Document
associated with these settings.
This document is accessible with the method getDocument()
.appendChild
in interface Node
appendChild
in class IlvSettings
newChild
- The node to add.If it is a DocumentFragment
object, the entire contents of the document fragment are moved
into the child list of this nodeDOMException
- HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild
node, or if
the node to append is one of this node's ancestors.
newChild
was created
from a different document than the one that created this node.
public boolean hasChildNodes()
getDocument()
.hasChildNodes
in interface Node
hasChildNodes
in class IlvSettings
true
if this document has any children,
false
otherwise.public Node cloneNode(boolean deep)
parentNode
is null
.).
Node.cloneNode(boolean)
.cloneNode
in interface Node
cloneNode
in class IlvSettings
deep
- If true
, recursively clone the subtree under
the specified node; if false
, clone only the node
itself (and its attributes, if it is an Element
).IlvXMLSettings
instance
associated with a Document
that is a clone of the
document associated with these settings.getDocument()
public void normalize()
Text
nodes in the full depth of the sub-tree
underneath this Node
.
Document
associated with these settings.
This document is accessible with the method getDocument()
.
Node.normalize()
.normalize
in interface Node
normalize
in class IlvSettings
public boolean isSupported(String feature, String version)
Document
associated with these settings implements a specific feature and
that feature is supported by this node.
The document associated with these settings is accessible with
the method getDocument()
.isSupported
in interface Node
isSupported
in class IlvSettings
feature
- The name of the feature to test. This is the same name
which can be passed to the method hasFeature
on
DOMImplementation
.version
- This is the version number of the feature to test. In
Level 2, version 1, this is the string "2.0". If the version is not
specified, supporting any version of the feature will cause the
method to return true
.true
if the specified feature is
supported on this node, false
otherwise.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.