Beispiel #1
0
    } // reset()

    /*
    ****************************************************************************
    * fromDOM()
    ****************************************************************************
    */ /**
    *  This method populates the obj from DOM.  It does not keep a
    * copy of the DOM around.  Whitespace information is lost in this process.
    */
    public void fromDOM(Element oElem)
    {
        reset();

        msTag = oElem.getLocalName();

        // get the id attribute
        if (oElem.hasAttributeNS(null, Tags.ATTR_NAMEQUALIFIER))
        {
            msNQ = oElem.getAttributeNS(null, Tags.ATTR_NAMEQUALIFIER);
        }

        Node oChild = oElem.getFirstChild();
        if ((oChild != null) && (oChild.getNodeType() == Node.TEXT_NODE))
        {
            msValue = oChild.getNodeValue();
        }

    } // fromDOM()