标签: java xml-parsing attributes sax saxparser
在Java中使用SAX Parser时,我们将属性作为startElement方法中的参数之一。
startElement
有人可以告诉我如何克隆这些属性,以便将其存储在HashMap<String, Attributes>中。
HashMap<String, Attributes>
答案 0 :(得分:1)
new AttributesImpl(Attributes atts)
复制现有的Attributes对象。这个构造函数尤其如此 在startElement事件中有用。