If it is, a StartElement object is instantiated.
如果是,则一个StartElement对象被实例化。
StartElement which the parser calls when it reads a start tag.
startElement,语法分析器读取到开始标记时调用它。
The startElement method loads and runs the class whose local name corresponds to the tag found.
startElement方法加载并运行本地名对应所找到的标签的类。
The startElement method in the content handler receives control and is passed the set of attributes specified on the element.
在内容处理程序中的 startElement方法接收控制并传递该元素的一些指定属性。
You are likely to work with StartElement more frequently than any other event, as it is typically used to represent most of the information in an XML document.
和其他事件相比可能会经常处理StartElement,因为它通常用于表示XML文档的大部分信息。
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之前将所有字符连接起来并返回结果字符串。
When the XML parser goes through the XML source and finds that a new element is started, it triggers the startElement function, which you specified as a callback function.
当xml解析器遍历xml源并发现开始了一个新元素时,它会触发指定为回调函数的startelement函数。
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() 方法中按类型进行切换。
应用推荐