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

Variable Index

 o CDATA
CDATA or unknown
 o ID
 o IDREF
 o IDREFS
 o NDATA
 o NMTOKEN
 o NMTOKENS
 o NOTATION
 o typeString

Constructor Index

 o Attribute(Attribute)
copy constructor
 o Attribute(String, String)
create Attribute from name and value.
 o Attribute(String, String, int)
make attribute

Method Index

 o toString()
return attribute as "name=value" (no spaces).

Variables

 o CDATA
 public static final int CDATA
CDATA or unknown

 o ID
 public static final int ID
 o IDREF
 public static final int IDREF
 o IDREFS
 public static final int IDREFS
 o NMTOKEN
 public static final int NMTOKEN
 o NMTOKENS
 public static final int NMTOKENS
 o NOTATION
 public static final int NOTATION
 o NDATA
 public static final int NDATA
 o typeString
 public static final String typeString[]

Constructors

 o 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)
 o 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 '"&<>)
 o Attribute
 public Attribute(Attribute attribute)
copy constructor

Parameters:
Attribute - attribute the attribute to be copied

Methods

 o 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