org.mozilla.javascript.xml

Class XMLLib


public abstract class XMLLib
extends java.lang.Object

Method Summary

protected XMLLib
bindToScope(Scriptable scope)
abstract String
escapeAttributeValue(Object value)
Escapes the reserved characters in a value of an attribute and surround it by "".
abstract String
escapeTextValue(Object value)
Escapes the reserved characters in a value of a text node
static XMLLib
extractFromScope(Scriptable scope)
static XMLLib
extractFromScopeOrNull(Scriptable scope)
abstract boolean
isXMLName(Context cx, Object name)
abstract Ref
nameRef(Context cx, Object namespace, Object name, Scriptable scope, int memberTypeFlags)
abstract Ref
nameRef(Context cx, Object name, Scriptable scope, int memberTypeFlags)
abstract Object
toDefaultXmlNamespace(Context cx, Object uriValue)
Construct namespace for default xml statement.

Method Details

bindToScope

protected final XMLLib bindToScope(Scriptable scope)

escapeAttributeValue

public abstract String escapeAttributeValue(Object value)
Escapes the reserved characters in a value of an attribute and surround it by "".
Parameters:
value - Unescaped text
Returns:
The escaped text

escapeTextValue

public abstract String escapeTextValue(Object value)
Escapes the reserved characters in a value of a text node
Parameters:
value - Unescaped text
Returns:
The escaped text

extractFromScope

public static XMLLib extractFromScope(Scriptable scope)

extractFromScopeOrNull

public static XMLLib extractFromScopeOrNull(Scriptable scope)

isXMLName

public abstract boolean isXMLName(Context cx,
                                  Object name)

nameRef

public abstract Ref nameRef(Context cx,
                            Object namespace,
                            Object name,
                            Scriptable scope,
                            int memberTypeFlags)

nameRef

public abstract Ref nameRef(Context cx,
                            Object name,
                            Scriptable scope,
                            int memberTypeFlags)

toDefaultXmlNamespace

public abstract Object toDefaultXmlNamespace(Context cx,
                                             Object uriValue)
Construct namespace for default xml statement.