本文整理汇总了Java中org.xml.sax.helpers.DefaultHandler.startElement方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultHandler.startElement方法的具体用法?Java DefaultHandler.startElement怎么用?Java DefaultHandler.startElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.xml.sax.helpers.DefaultHandler
的用法示例。
在下文中一共展示了DefaultHandler.startElement方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startElement
import org.xml.sax.helpers.DefaultHandler; //导入方法依赖的package包/类
/**
* The start of an element.
*
* @param namespaceURI the namespace.
* @param localName the element name.
* @param qName the element name.
* @param atts the element attributes.
*
* @throws SAXException for errors.
*/
public void startElement(final String namespaceURI,
final String localName,
final String qName,
final Attributes atts) throws SAXException {
final DefaultHandler current = getCurrentHandler();
if (current != this) {
current.startElement(namespaceURI, localName, qName, atts);
}
else if (qName.equals(CATEGORYDATASET_TAG)) {
this.dataset = new DefaultCategoryDataset();
}
else if (qName.equals(SERIES_TAG)) {
final CategorySeriesHandler subhandler = new CategorySeriesHandler(this);
getSubHandlers().push(subhandler);
subhandler.startElement(namespaceURI, localName, qName, atts);
}
else {
throw new SAXException("Element not recognised: " + qName);
}
}
示例2: startElement
import org.xml.sax.helpers.DefaultHandler; //导入方法依赖的package包/类
/**
* Starts an element.
*
* @param namespaceURI the namespace.
* @param localName the element name.
* @param qName the element name.
* @param atts the element attributes.
*
* @throws SAXException for errors.
*/
public void startElement(final String namespaceURI,
final String localName,
final String qName,
final Attributes atts) throws SAXException {
final DefaultHandler current = getCurrentHandler();
if (current != this) {
current.startElement(namespaceURI, localName, qName, atts);
}
else if (qName.equals(PIEDATASET_TAG)) {
this.dataset = new DefaultPieDataset();
}
else if (qName.equals(ITEM_TAG)) {
final ItemHandler subhandler = new ItemHandler(this, this);
getSubHandlers().push(subhandler);
subhandler.startElement(namespaceURI, localName, qName, atts);
}
}
示例3: startElement
import org.xml.sax.helpers.DefaultHandler; //导入方法依赖的package包/类
/**
* The start of an element.
*
* @param namespaceURI the namespace.
* @param localName the element name.
* @param qName the element name.
* @param atts the element attributes.
*
* @throws SAXException for errors.
*/
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes atts) throws SAXException {
DefaultHandler current = getCurrentHandler();
if (current != this) {
current.startElement(namespaceURI, localName, qName, atts);
}
else if (qName.equals(CATEGORYDATASET_TAG)) {
this.dataset = new DefaultCategoryDataset();
}
else if (qName.equals(SERIES_TAG)) {
CategorySeriesHandler subhandler = new CategorySeriesHandler(this);
getSubHandlers().push(subhandler);
subhandler.startElement(namespaceURI, localName, qName, atts);
}
else {
throw new SAXException("Element not recognised: " + qName);
}
}
示例4: startElement
import org.xml.sax.helpers.DefaultHandler; //导入方法依赖的package包/类
/**
* Starts an element.
*
* @param namespaceURI the namespace.
* @param localName the element name.
* @param qName the element name.
* @param atts the element attributes.
*
* @throws SAXException for errors.
*/
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes atts) throws SAXException {
DefaultHandler current = getCurrentHandler();
if (current != this) {
current.startElement(namespaceURI, localName, qName, atts);
}
else if (qName.equals(PIEDATASET_TAG)) {
this.dataset = new DefaultPieDataset();
}
else if (qName.equals(ITEM_TAG)) {
ItemHandler subhandler = new ItemHandler(this, this);
getSubHandlers().push(subhandler);
subhandler.startElement(namespaceURI, localName, qName, atts);
}
}