方法 getPrefix() 是获得名称空间属性的本地名的快捷方式(除非是默认名称空间声明,这种情况下前缀是一个空字符串而非 “xmlns”)。
Method getPrefix() is a shorthand for getting the namespace attribute's local name (unless it is a default namespace declaration, in which case the prefix is an empty string rather than "xmlns").
在这种情况下,配置属性值被当作一个前缀,其后会附加一个唯一整数。
In such a case, the configured property value is treated as a prefix to which a unique integer is appended.
如果您使用名称空间,请尽量在根元素位置声明所有名称空间,并且不要覆盖名称空间前缀,否则情况会非常混乱。
If you do use namespaces, try to keep all of your namespace declarations on the root element, and do not override your namespace prefixes because that way lies madness.
应用推荐