⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dcoutputwrapper.java

📁 java xml 应用开发
💻 JAVA
字号:
import org.w3c.dom.Element;



class DCOutputWrapper
{
    protected Element m_Element;

    public DCOutputWrapper(Element element)
    {
        this.m_Element = element;
    }
    
    protected Element getElement()
    {
        return this.m_Element;
    }
    
    protected String getXPath()
    {
        String strXPath;

        if (!m_Element.hasAttribute("XPath"))
        {
            strXPath = "";
        }
        else
        {
            strXPath = m_Element.getAttribute("XPath");
        }
        return strXPath;
    }
    
    protected String getCapXPath()
    {
        String strCapXPath;

        if (!m_Element.hasAttribute("CapXPath"))
        {
        	strCapXPath = "";
        }
        else
        {
        	strCapXPath = " [" + m_Element.getAttribute("CapXPath") + "]";
        }
        return strCapXPath;
    }
    
    protected String getFormattedXPath()
    {
        String strXPath;

        if (!m_Element.hasAttribute("XPath"))
        {
        	strXPath = "";
        }
        else
        {
        	strXPath = " XPath=[" + m_Element.getAttribute("XPath") + "]";
        }
        return strXPath;
    }
    
    protected String getMessage()
    {
        String strMessage;

        if (!m_Element.hasAttribute("Message"))
        {
        	strMessage = "";
        }
        else
        {
        	strMessage = ": " + m_Element.getAttribute("Message");
        }
        return strMessage;
    }
    
    public String toString()
    {
        String strNodeName = m_Element.getTagName();
        strNodeName += getCapXPath() + getMessage();
        return strNodeName;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -