EndElement marks the end of the current branch.
endElement用于标记当前分支的结束。
EndElement represents the element's closing tag (or simply the end of the element's markup, if it is an empty element).
EndElement表示元素的结束标记(或元素标记的结束,如果是空元素的话)。
Starting with StartElement as the next expected event, the method will concatenate all characters and return the resulting string before an EndElement is encountered.
从StartElement作为下一个预期事件开始,该方法在遇到EndElement之前将所有字符连接起来并返回结果字符串。
The difficulty in writing SAX handlers is that the code to process a specific element (say cfg:body) is split over several events (such as startElement() and endElement()).
编写SAX处理器的困难在于:要将处理一个特定元素(例如cfg:body )的代码拆分成几个事件(例如startElement()和endElement() )。
That is, a visitor will have a .visit_FOO() and .depart_FOO() method for each type of node, rather than switching on type within large .startElement() and endElement() methods.
即,访问器会有针对每种类型节点的 .visit_FOO()和 .depart_FOO()方法,而不是在大型的.startElement() 和endElement() 方法中按类型进行切换。
That is, a visitor will have a .visit_FOO() and .depart_FOO() method for each type of node, rather than switching on type within large .startElement() and endElement() methods.
即,访问器会有针对每种类型节点的 .visit_FOO()和 .depart_FOO()方法,而不是在大型的.startElement() 和endElement() 方法中按类型进行切换。
应用推荐