|
Community Map Builder 21 Aug 2007 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--Sarissa
Defined in Sarissa.js
Field Summary | |
<static> Object |
PARSED_EMPTY
|
<static> Object |
PARSED_OK
|
<static> Object |
PARSED_UNKNOWN_ERROR
|
Constructor Summary | |
Sarissa
()
Sarissa is a utility class. |
Method Summary | |
<static> void
|
clearChildNodes(oNode)
Deletes all child nodes of the given node |
<static> void
|
copyChildNodes(nodeFrom, nodeTo, bPreserveExisting)
Copies the childNodes of nodeFrom to nodeTo Note: The second object's original content is deleted before the copy operation, unless you supply a true third parameter |
<static> Object
|
escape(sXml)
Escape the given string chacters that correspond to the five predefined XML entities |
<static> Object
|
getDomDocument(sUri, sName)
Factory method to obtain a new DOM Document object |
<static> Object
|
getParseErrorText(oDoc)
Returns a human readable description of the parsing error. |
<static> Object
|
getText(oNode, deep)
|
<static> void
|
moveChildNodes(nodeFrom, nodeTo, bPreserveExisting)
Moves the childNodes of nodeFrom to nodeTo Note: The second object's original content is deleted before the move operation, unless you supply a true third parameter |
<static> void
|
setXpathNamespaces(oDoc, sNsSet)
|
<static> Object
|
stripTags(s)
strips tags from a markup string |
<static> Object
|
xmlize(anyObject, objectName, indentSpace)
Serialize any object to an XML string. |
Field Detail |
<static> Object PARSED_EMPTY
<static> Object PARSED_OK
<static> Object PARSED_UNKNOWN_ERROR
Constructor Detail |
Sarissa()
Sarissa is a utility class. Provides "static" methods for DOMDocument, DOM Node serialization to XML strings and other utility goodies.
Method Detail |
<static> void clearChildNodes(oNode)
Deletes all child nodes of the given node
oNode
- the Node to empty
<static> void copyChildNodes(nodeFrom, nodeTo, bPreserveExisting)
Copies the childNodes of nodeFrom to nodeTo
Note: The second object's original content is deleted before the copy operation, unless you supply a true third parameter
nodeFrom
- the Node to copy the childNodes from
nodeTo
- the Node to copy the childNodes to
bPreserveExisting
- whether to preserve the original content of nodeTo, default is false
<static> Object escape(sXml)
sXml
- the string to escape
<static> Object getDomDocument(sUri, sName)
Factory method to obtain a new DOM Document object
sUri
- the namespace of the root node (if any)
sUri
- the local name of the root node (if any)
<static> Object getParseErrorText(oDoc)
Returns a human readable description of the parsing error. Usefull for debugging. Tip: append the returned error string in a <pre> element if you want to render it.
Many thanks to Christian Stocker for the initial patch.
oDoc
- The target DOM document
<static> Object getText(oNode, deep)
<static> void moveChildNodes(nodeFrom, nodeTo, bPreserveExisting)
Moves the childNodes of nodeFrom to nodeTo
Note: The second object's original content is deleted before the move operation, unless you supply a true third parameter
nodeFrom
- the Node to copy the childNodes from
nodeTo
- the Node to copy the childNodes to
bPreserveExisting
- whether to preserve the original content of nodeTo, default is
<static> void setXpathNamespaces(oDoc, sNsSet)
<static> Object stripTags(s)
<static> Object xmlize(anyObject, objectName, indentSpace)
Serialize any object to an XML string. All properties are serialized using the property name
as the XML element name. Array elements are rendered as array-item
elements,
using their index/key as the value of the key
attribute.
anyObject
- the object to serialize
objectName
- a name for that object
|
Community Map Builder 21 Aug 2007 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |