XML SAX: Explain result in `qName` and `localName` in one example XML file

老子叫甜甜 提交于 2019-12-01 13:16:51

This is slightly unclear in the Javadoc:

uri - the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed

localName - the local name (without prefix), or the empty string if Namespace processing is not being performed

qName - the qualified name (with prefix), or the empty string if qualified names are not available

atts - the attributes attached to the element. If there are no attributes, it shall be an empty Attributes object. The value of this object after startElement returns is undefined

With namespace processing turned off, only the qName is being returned (with no prefix).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!