当前位置: 首页>>代码示例>>Java>>正文


Java DefaultHandler.startElement方法代码示例

本文整理汇总了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);
    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:33,代码来源:CategoryDatasetHandler.java

示例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);
    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:PieDatasetHandler.java

示例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);
    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:33,代码来源:CategoryDatasetHandler.java

示例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);
    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:PieDatasetHandler.java


注:本文中的org.xml.sax.helpers.DefaultHandler.startElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。