What is the difference between localname and qname?

前端 未结 3 1450
说谎
说谎 2020-12-13 18:56

When using SAX to parse an XML file in Java, what is the difference between the parameters localname and qname in SAX methods such as

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 19:32

    Generally speaking, localname is the local name, meaning inside the namespace. qname, or qualified name, is the full name (including namespace). For example, will have a localname b, but a qname a:b.

    This is however very general, and settings-dependant. Take a look at the example at the end of this page for a more thorough example: example

提交回复
热议问题