Class XML
- All Implemented Interfaces:
Serializable, ConstProperties, DebuggableObject, IdFunctionCall, Scriptable, SymbolScriptable
-
Nested Class Summary
Nested classes/interfaces inherited from class ScriptableObject
ScriptableObject.KeyComparator -
Field Summary
FieldsFields inherited from class ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface Scriptable
NOT_FOUND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate XmlNode.Namespaceprivate void(package private) voidaddMatches(XMLList rv, XMLName name) (package private) XML(package private) XMLappendChild(Object xml) (package private) XMLListchild(int index) (package private) XMLList(package private) int(package private) XMLListchildren()(package private) XMLListcomments()(package private) boolean(package private) XMLObjectImplcopy()voiddelete(int index) Removes the indexed property from the object.(package private) voiddeleteXMLProperty(XMLName name) ecmaDelete(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.(package private) final Stringprivate Stringprivate String(package private) XMLList(package private) booleanequivalentXml(Object target) Test XML equality with target the target.get(int index, Scriptable start) Returns the value of the indexed property or NOT_FOUND.(package private) XmlNode(package private) XML[]private intgetChildIndexOf(XML child) (package private) XML[]Return the name of the class.Return an additional object to look for methods that runtime should consider during method search.Object[]getIds()Returns an array of ids for the properties of the object.(package private) XML(package private) XmlNode.QNameprivate XmlNode[]getNodesForInsert(Object value) (package private) XMLListgetPropertyList(XMLName name) (package private) final XMLgetXML()(package private) XMLgetXmlChild(int index) (package private) ObjectgetXMLProperty(XMLName xmlName) ecmaGet(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.booleanhas(int index, Scriptable start) Returns true if the property index is defined.(package private) boolean(package private) booleanhasOwnProperty(XMLName xmlName) (package private) boolean(package private) booleanhasXMLProperty(XMLName xmlName) ecmaHas(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.(package private) voidinitialize(XmlNode node) (package private) Namespace[](package private) XMLinsertChildAfter(XML child, Object xml) (package private) XMLinsertChildBefore(XML child, Object xml) (package private) boolean(package private) final boolean(package private) final boolean(package private) final boolean(package private) final boolean(package private) final booleanisText()protected ObjectjsConstructor(Context cx, boolean inNewExpr, Object[] args) (package private) intlength()(package private) String(package private) XMLmakeXmlFromString(XMLName name, String value) (package private) QNamename()(package private) Namespace(package private) Namespace[](package private) ObjectnodeKind()(package private) void(package private) Objectparent()(package private) XMLprependChild(Object xml) (package private) XMLListprocessingInstructions(XMLName xmlName) (package private) booleanpropertyIsEnumerable(Object name) voidput(int index, Scriptable start, Object value) Sets the value of the indexed property, creating it if need be.(package private) voidputXMLProperty(XMLName xmlName, Object value) ecmaPut(cx, id, value) calls this after resolving when id to XMLName and checking it is not Uint32 index.(package private) voidremove()(package private) voidremoveChild(int index) (package private) XML(package private) XML(package private) XML(package private) voidreplaceWith(XML value) (package private) voidsetAttribute(XMLName xmlName, Object value) (package private) XMLsetChildren(Object xml) (package private) voidsetLocalName(String localName) (package private) void(package private) void(package private) XMLListtext()(package private) Node(package private) StringtoSource(int indent) toString()private XML(package private) String(package private) ObjectvalueOf()Methods inherited from class XMLObjectImpl
addValues, createEmptyXML, createNamespace, createNamespaces, delete, delete, ecmaEscapeAttributeValue, ecmaToXml, enterDotQuery, enterWith, equivalentValues, execIdCall, exportAsJSClass, findPrototypeId, get, get, getDefaultValue, getFunctionProperty, getFunctionProperty, getLib, getParentScope, getProcessor, getPrototype, has, has, hasInstance, initialize, initPrototypeId, isPrototype, memberRef, memberRef, newQName, newQName, newTextElementXML, newXML, newXMLFromJs, newXMLList, newXMLListFrom, put, put, setParentScope, setPrototype, xmlFromNodeMethods inherited from class IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, ensureType, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, findInstanceIdInfo, findPrototypeId, get, getAttributes, getAttributes, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, getOwnPropertyDescriptor, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, setAttributes, setInstanceIdAttributes, setInstanceIdValueMethods inherited from class ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getProperty, getProperty, getProperty, getPropertyIds, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, size
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
node
-
-
Constructor Details
-
XML
XML(XMLLibImpl lib, Scriptable scope, XMLObject prototype, XmlNode node)
-
-
Method Details
-
initialize
-
getXML
- Specified by:
getXMLin classXMLObjectImpl
-
replaceWith
-
makeXmlFromString
-
getAnnotation
XmlNode getAnnotation() -
get
Description copied from class:ScriptableObjectReturns the value of the indexed property or NOT_FOUND.- Specified by:
getin interfaceScriptable- Overrides:
getin classScriptableObject- Parameters:
index- the numeric index for the propertystart- the object in which the lookup began- Returns:
- the value of the property (may be null), or NOT_FOUND
- See Also:
-
has
Description copied from class:ScriptableObjectReturns true if the property index is defined.- Specified by:
hasin interfaceScriptable- Overrides:
hasin classScriptableObject- Parameters:
index- the numeric index for the propertystart- the object in which the lookup began- Returns:
- true if and only if the property was found in the object
- See Also:
-
put
Description copied from class:ScriptableObjectSets the value of the indexed property, creating it if need be.- Specified by:
putin interfaceScriptable- Overrides:
putin classScriptableObject- Parameters:
index- the numeric index for the propertystart- the object whose property is being setvalue- value to set the property to- See Also:
-
getIds
Description copied from class:ScriptableObjectReturns an array of ids for the properties of the object.Any properties with the attribute DONTENUM are not listed.
- Specified by:
getIdsin interfaceScriptable- Overrides:
getIdsin classScriptableObject- Returns:
- an array of java.lang.Objects with an entry for every listed property. Properties accessed via an integer index will have a corresponding Integer entry in the returned array. Properties accessed by a String will have a String entry in the returned array.
-
delete
public void delete(int index) Description copied from class:ScriptableObjectRemoves the indexed property from the object.If the property is not found, or it has the PERMANENT attribute, no action is taken.
- Specified by:
deletein interfaceScriptable- Overrides:
deletein classScriptableObject- Parameters:
index- the numeric index for the property- See Also:
-
hasXMLProperty
Description copied from class:XMLObjectImplecmaHas(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
hasXMLPropertyin classXMLObjectImpl
-
getXMLProperty
Description copied from class:XMLObjectImplecmaGet(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
getXMLPropertyin classXMLObjectImpl
-
getNodeQname
XmlNode.QName getNodeQname() -
getChildren
XML[] getChildren() -
getAttributes
XML[] getAttributes() -
getPropertyList
-
deleteXMLProperty
Description copied from class:XMLObjectImplecmaDelete(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
deleteXMLPropertyin classXMLObjectImpl
-
putXMLProperty
Description copied from class:XMLObjectImplecmaPut(cx, id, value) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
putXMLPropertyin classXMLObjectImpl
-
hasOwnProperty
- Specified by:
hasOwnPropertyin classXMLObjectImpl
-
jsConstructor
- Specified by:
jsConstructorin classXMLObjectImpl
-
getExtraMethodSource
Description copied from class:XMLObjectReturn an additional object to look for methods that runtime should consider during method search. Return null if no such object available.- Specified by:
getExtraMethodSourcein classXMLObject
-
removeChild
void removeChild(int index) -
normalize
void normalize()- Specified by:
normalizein classXMLObjectImpl
-
toXML
-
setAttribute
-
remove
void remove() -
addMatches
- Specified by:
addMatchesin classXMLObjectImpl
-
elements
- Specified by:
elementsin classXMLObjectImpl
-
child
- Specified by:
childin classXMLObjectImpl
-
replace
-
children
XMLList children()- Specified by:
childrenin classXMLObjectImpl
-
child
- Specified by:
childin classXMLObjectImpl
-
getXmlChild
-
getLastXmlChild
XML getLastXmlChild() -
childIndex
int childIndex() -
contains
- Specified by:
containsin classXMLObjectImpl
-
equivalentXml
Description copied from class:XMLObjectImplTest XML equality with target the target.- Specified by:
equivalentXmlin classXMLObjectImpl
-
copy
XMLObjectImpl copy()- Specified by:
copyin classXMLObjectImpl
-
hasSimpleContent
boolean hasSimpleContent()- Specified by:
hasSimpleContentin classXMLObjectImpl
-
hasComplexContent
boolean hasComplexContent()- Specified by:
hasComplexContentin classXMLObjectImpl
-
length
int length()- Specified by:
lengthin classXMLObjectImpl
-
is
-
nodeKind
Object nodeKind() -
parent
Object parent()- Specified by:
parentin classXMLObjectImpl
-
propertyIsEnumerable
- Specified by:
propertyIsEnumerablein classXMLObjectImpl
-
valueOf
Object valueOf()- Specified by:
valueOfin classXMLObjectImpl
-
comments
XMLList comments()- Specified by:
commentsin classXMLObjectImpl
-
text
XMLList text()- Specified by:
textin classXMLObjectImpl
-
processingInstructions
- Specified by:
processingInstructionsin classXMLObjectImpl
-
getNodesForInsert
-
replace
-
prependChild
-
appendChild
-
getChildIndexOf
-
insertChildBefore
-
insertChildAfter
-
setChildren
-
addInScopeNamespace
-
inScopeNamespaces
Namespace[] inScopeNamespaces() -
adapt
-
removeNamespace
-
addNamespace
-
name
QName name() -
namespaceDeclarations
Namespace[] namespaceDeclarations() -
namespace
-
localName
String localName() -
setLocalName
-
setName
-
setNamespace
-
ecmaClass
-
getClassName
Description copied from class:ScriptableObjectReturn the name of the class.This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
- Specified by:
getClassNamein interfaceScriptable- Specified by:
getClassNamein classScriptableObject
-
ecmaValue
-
ecmaToString
-
toString
- Specified by:
toStringin classXMLObjectImpl
-
toSource
- Specified by:
toSourcein classXMLObjectImpl
-
toXMLString
String toXMLString()- Specified by:
toXMLStringin classXMLObjectImpl
-
isAttribute
final boolean isAttribute() -
isComment
final boolean isComment() -
isText
final boolean isText() -
isElement
final boolean isElement() -
isProcessingInstruction
final boolean isProcessingInstruction() -
toDomNode
Node toDomNode()
-