All Packages Class Hierarchy This Package Previous Next Index
Class jumbo.xml.Attribute
java.lang.Object
|
+----com.sun.java.swing.tree.DefaultMutableTreeNode
|
+----jumbo.xml.XNode
|
+----jumbo.xml.Attribute
- public class Attribute
- extends XNode
an attribute as defined in the spec (not an AttDef). Consists
of a name, value and type (all can be returned by SAX). The type is
held as an integer (see below). In general names and values are exact
but some XML operations allow for variation.
Most operations involving attributes will be found under XNode
- Author:
- P.Murray-Rust, 1998
-
CDATA
- CDATA or unknown
-
ID
-
-
IDREF
-
-
IDREFS
-
-
NDATA
-
-
NMTOKEN
-
-
NMTOKENS
-
-
NOTATION
-
-
typeString
-
-
Attribute(Attribute)
- copy constructor
-
Attribute(String, String)
- create Attribute from name and value.
-
Attribute(String, String, int)
- make attribute
-
toString()
- return attribute as "name=value" (no spaces).
CDATA
public static final int CDATA
- CDATA or unknown
ID
public static final int ID
IDREF
public static final int IDREF
IDREFS
public static final int IDREFS
NMTOKEN
public static final int NMTOKEN
NMTOKENS
public static final int NMTOKENS
NOTATION
public static final int NOTATION
NDATA
public static final int NDATA
typeString
public static final String typeString[]
Attribute
public Attribute(String name,
String value,
int type)
- make attribute
- Parameters:
- name - name (not checked for XML validity)
- value - value (may contain '"&<>)
- type - type of attribute (see symbolic values)
Attribute
public Attribute(String name,
String value)
- create Attribute from name and value. Assume type is CDATA
- Parameters:
- name - name (not checked for XML validity)
- value - value (may contain '"&<>)
Attribute
public Attribute(Attribute attribute)
- copy constructor
- Parameters:
- Attribute - attribute the attribute to be copied
toString
public String toString()
- return attribute as "name=value" (no spaces). The famous five
characters are escaped (' -> ' etc.)
- Returns:
- Stringattribute as name=value
- Overrides:
- toString in class XNode
All Packages Class Hierarchy This Package Previous Next Index