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

📄 e538. determining if an attribute was supplied in a dom element.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
In the case of an attribute with a default value, it is possible to determine if the attribute was explicitly supplied in the original XML document or automatically created when it was parsed. 
Note: If the attribute value is changed in the DOM document, the attributed is considered to have been supplied, even if the new value is the same as the default value. 

    // Get Attr node
    Attr attr = (Attr)element.getAttributeNode("attrName");
    boolean wasSpecified = attr != null && attr.getSpecified();

⌨️ 快捷键说明

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