FileDocCategorySizeDatePackage
XMLElement.javaAPI DocGlassfish v2 API3572Fri May 04 22:31:40 BST 2007com.sun.enterprise.deployment.node

XMLElement

public class XMLElement extends Object
This class represents a XML element in an XML file
author
Jerome Dochez
version

Fields Summary
private String
qName
private String
prefix
private NamespaceSupport
namespaces
Constructors Summary
public XMLElement(String qName)
Creates new XMLElement

    
        
       
        this(qName, null);
    
public XMLElement(String qName, NamespaceSupport namespaceSupport)

        if (qName.indexOf(':")!=-1) {
            prefix = qName.substring(0, qName.indexOf(':"));
            this.qName = qName.substring(qName.indexOf(':")+1);
        } else {
            this.qName = qName;
        }
        // can be null
        namespaces = namespaceSupport;
    
Methods Summary
public booleanequals(com.sun.enterprise.deployment.node.XMLElement other)

        return qName.equals(other.getQName());
    
public java.lang.StringgetCompleteName()

        if (prefix!=null) {
            return prefix+":"+qName;
        } else {
            return qName;
        }
    
public java.lang.StringgetPrefix()

        return prefix;
    
public java.lang.StringgetPrefixURIMapping(java.lang.String prefixToResolve)
Map a prefix to a namespaceURI based on the namespace context of this XML element.

        return ( (namespaces != null) && (prefixToResolve != null) ) ? 
            namespaces.getURI(prefixToResolve) : null;
    
public java.lang.StringgetQName()

        return qName;
    
public java.lang.StringtoString()

        return qName;