org.gjt.xpp.impl.node

Class Node

public class Node extends StartTag implements XmlNode

Encapsulate XML Node with list of associated children and namespaces :-).

Author: Aleksander Slominski

Field Summary
protected Vectorchildren
protected intchildrenCount
protected String[]declaredNs
protected intdeclaredNsEnd
protected String[]declaredPrefixes
protected StringdefaultNamespaceUri
protected static EnumerationEMPTY_ENUMERATION
protected ObjectoneChild
protected XmlNodeparent
protected Hashtableprefix2Ns
Constructor Summary
Node()
Method Summary
voidaddDeclaredNamespaces(String[] prefix, int off, int len, String[] namespaceUri)
voidaddNamespaceDeclaration(String prefix, String namespaceUri)
voidappendChild(Object child)
Enumerationchildren()
voidensureChildrenCapacity(int minCapacity)
voidensureDeclaredNamespacesCapacity(int minCapacity)
booleanequals(Object o)
ObjectgetChildAt(int pos)
intgetChildrenCount()
it may need to reconsruct whole subtree to get count ...
intgetDeclaredNamespaceLength()
StringgetDefaultNamespaceUri()
XmlNodegetParentNode()
StringgetQNameLocal(String qName)
StringgetQNameUri(String qName)
voidinsertChildAt(int pos, Object child)
Stringnamespace2Prefix(String namespaceUri)
XmlNodenewNode()
context sensitive factory method to create the same type of node
XmlNodenewNode(String namespaceUri, String localName)
Stringprefix2Namespace(String prefix)
protected voidprintFields(StringBuffer buf)
Print into StringBuffer element name
voidreadDeclaredNamespaceUris(String[] uris, int off, int len)
voidreadDeclaredPrefixes(String[] prefixes, int off, int len)
voidremoveChildAt(int pos)
voidremoveChildren()
voidremoveDeclaredNamespaces()
voidreplaceChildAt(int pos, Object child)
voidresetNode()
voidsetDefaultNamespaceUri(String defaultNamespaceUri)
voidsetParentNode(XmlNode parent)
StringtoString()
Return string representation of start tag including name and list of attributes.

Field Detail

children

protected Vector children

childrenCount

protected int childrenCount

declaredNs

protected String[] declaredNs

declaredNsEnd

protected int declaredNsEnd

declaredPrefixes

protected String[] declaredPrefixes

defaultNamespaceUri

protected String defaultNamespaceUri

EMPTY_ENUMERATION

protected static final Enumeration EMPTY_ENUMERATION

oneChild

protected Object oneChild

parent

protected XmlNode parent

prefix2Ns

protected Hashtable prefix2Ns

Constructor Detail

Node

public Node()

Method Detail

addDeclaredNamespaces

public void addDeclaredNamespaces(String[] prefix, int off, int len, String[] namespaceUri)

addNamespaceDeclaration

public void addNamespaceDeclaration(String prefix, String namespaceUri)

appendChild

public void appendChild(Object child)

children

public Enumeration children()

ensureChildrenCapacity

public void ensureChildrenCapacity(int minCapacity)

ensureDeclaredNamespacesCapacity

public void ensureDeclaredNamespacesCapacity(int minCapacity)

equals

public boolean equals(Object o)

getChildAt

public Object getChildAt(int pos)

getChildrenCount

public int getChildrenCount()
it may need to reconsruct whole subtree to get count ...

getDeclaredNamespaceLength

public int getDeclaredNamespaceLength()

getDefaultNamespaceUri

public String getDefaultNamespaceUri()

getParentNode

public XmlNode getParentNode()

getQNameLocal

public String getQNameLocal(String qName)

getQNameUri

public String getQNameUri(String qName)

insertChildAt

public void insertChildAt(int pos, Object child)

namespace2Prefix

public String namespace2Prefix(String namespaceUri)

newNode

public XmlNode newNode()
context sensitive factory method to create the same type of node

newNode

public XmlNode newNode(String namespaceUri, String localName)

prefix2Namespace

public String prefix2Namespace(String prefix)

printFields

protected void printFields(StringBuffer buf)
Print into StringBuffer element name

readDeclaredNamespaceUris

public void readDeclaredNamespaceUris(String[] uris, int off, int len)

readDeclaredPrefixes

public void readDeclaredPrefixes(String[] prefixes, int off, int len)

removeChildAt

public void removeChildAt(int pos)

removeChildren

public void removeChildren()

removeDeclaredNamespaces

public void removeDeclaredNamespaces()

replaceChildAt

public void replaceChildAt(int pos, Object child)

resetNode

public void resetNode()

setDefaultNamespaceUri

public void setDefaultNamespaceUri(String defaultNamespaceUri)

setParentNode

public void setParentNode(XmlNode parent)

toString

public String toString()
Return string representation of start tag including name and list of attributes.
Copyright (c) 2003 IU Extreme! Lab http://www.extreme.indiana.edu/ All Rights Reserved.

Note this package is deprecated by XPP3 that implements XmlPull API