Code example for Stack

Methods: push

0
        // Define the default namespace (initially maps to "" uri) 
        Stack stack;
        m_namespaces.put(EMPTYSTRING, stack = new Stack());
        stack.push(new MappingRecord(EMPTYSTRING,EMPTYSTRING,0));
 
        m_namespaces.put(XML_PREFIX, stack = new Stack());
        stack.push(new MappingRecord( XML_PREFIX,
            "http://www.w3.org/XML/1998/namespace",0)); 
 
        m_nodeStack.push(new MappingRecord(null,null,-1));
 
    } 
 
    /** 
     * Use a namespace prefix to lookup a namespace URI. 
     *  
     * @param prefix String the prefix of the namespace 
     * @return the URI corresponding to the prefix 
     */ 
    public String lookupNamespace(String prefix)
    {