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