All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fasterxml.aalto.in.ElementScope Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package com.fasterxml.aalto.in;

/**
 * Simple container of information about an open element (one for which
 * start tag has been seen, but not yet end; or, for empty tags,
 * START_ELEMENT has been returned but END_ELEMENT not yet)
 */
public final class ElementScope
{
    ElementScope mParent;

    PName mName;

    public ElementScope(PName name, ElementScope parent)
    {
        mParent = parent;
        mName = name;
    }

    public PName getName() { return mName; }
    public ElementScope getParent() { return mParent; }

    @Override
    public String toString()
    {
        if (mParent == null) {
            return mName.toString();
        }
        return mParent.toString() + "/" + mName;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy