Child pages
  • XML

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Property SummaryIf set to true, then comments in the XML are ignored when constructing new XML objects.If set to true, then processing instructions are ignored when constructing new XML objects.If set to true, then whitespace in the XML is ignored when constructing new XML objects.The amount of positions used when indenting child nodes are relative to their parent if prettyPrinting is enabled.If set to true, then toString() and toXMLString() methods will normalize the output to achieve a uniform appearance.

servoy sSummary12%30%58%height: 30px;3Methods SummaryTakes one argument which can be a string with a namespace URI or a Namespace object and adds the argument to the in scope namespaces of this XML object.Appends a new child at the end of this XML object's properties, the changed XML object is then returned.Takes a single argument with the attribute name and returns an XMLList with attributes matching the argument.Returns an XMLList with the attributes of this XML object which are in no namespace.Returns an XMLList with children matching the property name.If the XML object has no parent then the special number NaN is returned, otherwise the ordinal position the object has in the context of its parent is returned.Returns an XMLList with the child nodes of this XML object.Returns an XMLList with the comment nodes which are children of this XML object.Calling xmlObject.Returns a deep copy of the XML object it is called on where the internal parent property is set to nullReturns an object containing the default XML settings.Returns an XMLList with the descendants matching the passed name argument or with all descendants if no argument is passed.Returns an XMLList with the descendants matching the passed name argument or with all descendants if no argument is passed.Takes one optional argument, the name of elements you are looking for, and returns an XMLList with all matching child elements.Takes one optional argument, the name of elements you are looking for, and returns an XMLList with all matching child elements.Returns false for XML objects of node kind 'text', 'attribute', 'comment', and 'processing-instruction'.Returns true if the XML object the method is called on has a property of that name.Returns true for XML objects of node kind text or attribute.Returns an array of Namespace objects representing the namespace that are in scope for this XML object.Takes two arguments, an existing child to insert after and the new child to be inserted.Takes two arguments, an existing child to insert before and the new child to be inserted.This always returns 1.returns the local name part if the XML object has a name.Returns the qualified name (a QName object) of the XML object it is calledIf no argument is passed to the method then it returns the namespace associated with the qualified name of this XML object.If no argument is passed to the method then it returns the namespace associated with the qualified name of this XML object.Returns an array with the namespace declarations associated with the XML object it is called on.Returns a string denoting the kind of node this XML object represents.Returns this XML object after normalizing all text content.Returns the parent XML object of this XML object or null if there is no parent.Iinserts the given value as the first child of the XML object and returns the XML object.If no argument is passed in then the method returns an XMLList with all the children of the XML object which are processing instructions.If no argument is passed in then the method returns an XMLList with all the children of the XML object which are processing instructions.Returns true if the property name is '0' and false otherwise.Removes the namespace from the in scope namespaces of this XML object if the namespace is not used for the qualified name of the object or its attributes.Takes two arguments, the property name of the property / properties to be replaced, and the value to replace the properties.Replaces all children of the XML object with this value.voidChanges the local name of this XML object to the name passed in.voidReplaces the name of this XML object with the name passed in.voidChanges the namespace associated with the name of this XML object to the new namespace.voidAllows the global XML settings to be adjusted or restored to their default values.voidAllows the global XML settings to be adjusted or restored to their default values.Returns an object containing the global XML settings.Returns an XMLList with all the children of this XML object that represent text nodes.Returns a convenient string value of this XML object.Returns a string with the serialized XML markup for this XML object.The method simply returns the XML object it is called on.

propertyservoy sDetail2100%height:30px2Property DetailsignoreCommentsname

ignoreComments

dessIndent
If set to true, then comments in the XML are ignored when constructing new XML objects.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowignoreProcessingInstructionsname

ignoreProcessingInstructions

dessIndent
If set to true, then processing instructions are ignored when constructing new XML objects.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ignoreWhitespacename

ignoreWhitespace

dessIndent
If set to true, then whitespace in the XML is ignored when constructing new XML objects.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
prettyIndentname

prettyIndent

dessIndent
The amount of positions used when indenting child nodes are relative to their parent
if prettyPrinting is enabled.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
prettyPrintingname

prettyPrinting

dessIndent
If set to true, then toString() and toXMLString() methods will normalize the output
to achieve a uniform appearance.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailsaddNamespacename

addNamespace(namespaceToAdd)

dessIndent
Takes one argument which can be a string with a namespace URI or a Namespace object and adds the 
argument to the in scope namespaces of this XML object.
prs

Parameters

sIndentnamespaceToAdd ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowappendChildname

appendChild(childToAppend)

dessIndent
Appends a new child at the end of this XML object's properties, the changed XML object is then returned.
prs

Parameters

sIndentchildToAppend ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
attributename

attribute(attributeName)

dessIndent
Takes a single argument with the attribute name and returns an XMLList with attributes 
matching the argument.
prs

Parameters

sIndentattributeName ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
attributesname

attributes()

dessIndent
Returns an XMLList with the attributes of this XML object which are in no namespace.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
childname

child(propertyName)

dessIndent
Returns an XMLList with children matching the property name.
prs

Parameters

sIndentpropertyName ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
childIndexname

childIndex()

dessIndent
If the XML object has no parent then the special number NaN is returned, otherwise the ordinal 
position the object has in the context of its parent is returned.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
childrenname

children()

dessIndent
Returns an XMLList with the child nodes of this XML object.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
commentsname

comments()

dessIndent
Returns an XMLList with the comment nodes which are children of this XML object.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
containsname

contains(value)

dessIndent
Calling xmlObject.contains(value) yields the same result as the equality comparison xmlObject == value
prs

Parameters

sIndentvalue ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
copyname

copy()

dessIndent
Returns a deep copy of the XML object it is called on where the internal parent property is set to null
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
defaultSettingsname

defaultSettings()

dessIndent
Returns an object containing the default XML settings.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
descendantsname

descendants()

dessIndent
Returns an XMLList with the descendants matching the passed name argument or with all descendants 
if no argument is passed.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
descendantsname

descendants(name)

dessIndent
Returns an XMLList with the descendants matching the passed name argument or with all descendants 
if no argument is passed.
prs

Parameters

sIndentname ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
elementsname

elements()

dessIndent
Takes one optional argument, the name of elements you are looking for, and returns an XMLList with 
all matching child elements.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
elementsname

elements(name)

dessIndent
Takes one optional argument, the name of elements you are looking for, and returns an XMLList with 
all matching child elements.
prs

Parameters

sIndentname ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
hasComplexContentname

hasComplexContent()

dessIndent
Returns false for XML objects of node kind 'text', 'attribute', 'comment', and 'processing-instruction'.
For objects of kind 'element' it checks whether the element has at least one child element.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
hasOwnPropertyname

hasOwnProperty(propertyName)

dessIndent
Returns true if the XML object the method is called on has a property of that name.
prs

Parameters

sIndentpropertyName ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
hasSimpleContentname

hasSimpleContent()

dessIndent
Returns true for XML objects of node kind text or attribute. For XML objects of node kind 
element it returns true if the element has no child elements and false otherwise.
For other node kinds (comment, processing instruction) the method always returns false.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
inScopeNamespacesname

inScopeNamespaces()

dessIndent
Returns an array of Namespace objects representing the namespace that are in scope for this XML object.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
insertChildAftername

insertChildAfter(childToInserAfter, childToInsert)

dessIndent
Takes two arguments, an existing child to insert after and the new child to be inserted.
If the first argument is null then the second argument is inserted as the first child of this XML.
prs

Parameters

sIndentchildToInserAfter ;childToInsert ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
insertChildBeforename

insertChildBefore(childToInsertBefore, childToInsert)

dessIndent
Takes two arguments, an existing child to insert before and the new child to be inserted.
If the first argument is null then the child is inserted as the last child.
prs

Parameters

sIndentchildToInsertBefore ;childToInsert ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
lengthname

length()

dessIndent
This always returns 1. This is done to blur the distinction between an XML object and an XMLList 
containing exactly one value.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
localNamename

localName()

dessIndent
returns the local name part if the XML object has a name.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
namename

name()

dessIndent
Returns the qualified name (a QName object) of the XML object it is called
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
namespacename

namespace()

dessIndent
If no argument is passed to the method then it returns the namespace associated with the qualified 
name of this XML object. If a prefix is passed to the method then it looks for a matching namespace 
in the in scope namespace of this XML object and returns it when found, otherwise undefined is returned.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
namespacename

namespace(prefix)

dessIndent
If no argument is passed to the method then it returns the namespace associated with the qualified 
name of this XML object. If a prefix is passed to the method then it looks for a matching namespace 
in the in scope namespace of this XML object and returns it when found, otherwise undefined is returned.
prs

Parameters

sIndentprefix ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
namespaceDeclarationsname

namespaceDeclarations()

dessIndent
Returns an array with the namespace declarations associated with the XML object it is called on.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
nodeKindname

nodeKind()

dessIndent
Returns a string denoting the kind of node this XML object represents. Possible values: 'element', 
'attribute', 'text', 'comment', 'processing-instruction'.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
normalizename

normalize()

dessIndent
Returns this XML object after normalizing all text content.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
parentname

parent()

dessIndent
Returns the parent XML object of this XML object or null if there is no parent.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
prependChildname

prependChild(childToPrepend)

dessIndent
Iinserts the given value as the first child of the XML object and returns the XML object.
prs

Parameters

sIndentchildToPrepend ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
processingInstructionsname

processingInstructions()

dessIndent
If no argument is passed in then the method returns an XMLList with all the children of the XML 
object which are processing instructions. If an argument is passed in then the method returns an 
XMLList with all children of the XML object which are processing instructions where the name 
matches the argument.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
processingInstructionsname

processingInstructions(name)

dessIndent
If no argument is passed in then the method returns an XMLList with all the children of the XML 
object which are processing instructions. If an argument is passed in then the method returns an 
XMLList with all children of the XML object which are processing instructions where the name 
matches the argument.
prs

Parameters

sIndentname ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
propertyIsEnumerablename

propertyIsEnumerable(propertyName)

dessIndent
Returns true if the property name is '0' and false otherwise.
prs

Parameters

sIndentpropertyName ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
removeNamespacename

removeNamespace(namespace)

dessIndent
Removes the namespace from the in scope namespaces of this XML object if the namespace 
is not used for the qualified name of the object or its attributes.
prs

Parameters

sIndentnamespace ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
replacename

replace(propertyName, replacementValue)

dessIndent
Takes two arguments, the property name of the property / properties to be replaced, and the 
value to replace the properties.
prs

Parameters

sIndentpropertyName ;replacementValue ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setChildrenname

setChildren(value)

dessIndent
Replaces all children of the XML object with this value. The method returns the XML object it 
is called on.
prs

Parameters

sIndentvalue ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setLocalNamename

setLocalName(name)

dessIndent
Changes the local name of this XML object to the name passed in.
prs

Parameters

sIndentname ;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setNamename

setName(name)

dessIndent
Replaces the name of this XML object with the name passed in.
prs

Parameters

sIndentname ;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setNamespacename

setNamespace(namespace)

dessIndent
Changes the namespace associated with the name of this XML object to the new namespace.
prs

Parameters

sIndentnamespace ;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setSettingsname

setSettings()

dessIndent
Allows the global XML settings to be adjusted or restored to their default values.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setSettingsname

setSettings(settings)

dessIndent
Allows the global XML settings to be adjusted or restored to their default values.
prs

Parameters

sIndentsettingsThe new settings that should be applied globally to the XML object.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
settingsname

settings()

dessIndent
Returns an object containing the global XML settings.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
textname

text()

dessIndent
Returns an XMLList with all the children of this XML object that represent text nodes.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
toStringname

toString()

dessIndent
Returns a convenient string value of this XML object.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
toXMLStringname

toXMLString()

dessIndent
Returns a string with the serialized XML markup for this XML object. XML.prettyPrinting 
and XML.prettyIndent settings affect the returned string.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
valueOfname

valueOf()

dessIndent
The method simply returns the XML object it is called on.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow