org.mozilla.javascript.xml

Class XMLLib


public abstract class XMLLib
extends java.lang.Object

Nested Class Summary

static class
XMLLib.Factory
An object which specifies an XMLLib implementation to be used at runtime.

Method Summary

protected XMLLib
bindToScope(Scriptable scope)
abstract String
escapeAttributeValue(Object value)
Escapes the reserved characters in a value of an attribute.
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)
int
getPrettyIndent()
boolean
isIgnoreComments()
boolean
isIgnoreProcessingInstructions()
boolean
isIgnoreWhitespace()
boolean
isPrettyPrinting()
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)
void
setIgnoreComments(boolean b)
void
setIgnoreProcessingInstructions(boolean b)
void
setIgnoreWhitespace(boolean b)
void
setPrettyIndent(int i)
void
setPrettyPrinting(boolean b)
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.
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)

getPrettyIndent

public int getPrettyIndent()

isIgnoreComments

public boolean isIgnoreComments()

isIgnoreProcessingInstructions

public boolean isIgnoreProcessingInstructions()

isIgnoreWhitespace

public boolean isIgnoreWhitespace()

isPrettyPrinting

public boolean isPrettyPrinting()

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)

setIgnoreComments

public void setIgnoreComments(boolean b)

setIgnoreProcessingInstructions

public void setIgnoreProcessingInstructions(boolean b)

setIgnoreWhitespace

public void setIgnoreWhitespace(boolean b)

setPrettyIndent

public void setPrettyIndent(int i)

setPrettyPrinting

public void setPrettyPrinting(boolean b)

toDefaultXmlNamespace

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