multivalent.std.adaptor
Class XML
public
class
XML
extends ML
An ever-closer approximation to the XML specification, which itself is a moving target.
Handles "xinclude:include".
Note: This may be replaced with Sun's XML Parser to pick up namespaces and all the little points of the spec.
XML is used as the storage format for hubs and annotations.
Version: $Revision: 1.6 $ $Date: 2002/10/31 03:12:30 $
Method Summary |
static void | encode(String str, StringBuffer sb, boolean q)
Encode characters from str as entity references (e.g., "<" => "<") and write to sb,
optionally surrounded by quotes (single quotes if no embedded single quote, else double quotes). |
static void | indent(int level, StringBuffer sb) Write out attribute names in this table first, in this order. |
Object | parse(INode parent) |
static ESISNode | parseDOM(URI uri)
XML can be also be treated not as a media adaptor but as an XML parsing utility.
|
static void | write(String name, Map<String,Object> attrs, StringBuffer sb, int level)
Write opening tag with generic identifier name and attributes attrs
into StringBuffer sb. |
public static void encode(String str, StringBuffer sb, boolean q)
Encode characters from str as entity references (e.g., "<" => "<") and write to sb,
optionally surrounded by quotes (single quotes if no embedded single quote, else double quotes).
public static void indent(int level, StringBuffer sb)
Write out attribute names in this table first, in this order. Should be a parameter.
public Object parse(
INode parent)
public static
ESISNode parseDOM(URI uri)
XML can be also be treated not as a media adaptor but as an XML parsing utility.
For general XML parsing instead use javax.xml.parsers.SAXParser or javax.xml.parsers.DocumentBuilder.
public static void write(String name, Map<String,Object> attrs, StringBuffer sb, int level)
Write opening tag with generic identifier name and attributes attrs
into StringBuffer sb. Indent according to nesting level.
Does not write a final ">" so client can add more attributes, close tag and add content, or write as empty ("... />").