本文整理汇总了Java中javax.xml.stream.util.XMLEventConsumer.add方法的典型用法代码示例。如果您正苦于以下问题:Java XMLEventConsumer.add方法的具体用法?Java XMLEventConsumer.add怎么用?Java XMLEventConsumer.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.xml.stream.util.XMLEventConsumer
的用法示例。
在下文中一共展示了XMLEventConsumer.add方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: allocate
import javax.xml.stream.util.XMLEventConsumer; //导入方法依赖的package包/类
public void allocate(XMLStreamReader xMLStreamReader, XMLEventConsumer xMLEventConsumer)
throws XMLStreamException {
XMLEvent currentEvent = getXMLEvent(xMLStreamReader);
if (currentEvent != null) {
xMLEventConsumer.add(currentEvent);
}
return;
}
示例2: addEventsTo
import javax.xml.stream.util.XMLEventConsumer; //导入方法依赖的package包/类
/**
* Adds the {@link XMLEvent}s in this stockpile to an {@link XMLEventConsumer}.
* @param consumer The {@link XMLEventConsumer} to add the {@link XMLEvent}s to.
* @return The {@link Stockpile} instance for chaining.
* @throws XMLStreamException If an XML error occurs.
*/
public Stockpile addEventsTo(XMLEventConsumer consumer) throws XMLStreamException {
for (XMLEvent event : events) {
consumer.add(event);
}
return this;
}
示例3: allocate
import javax.xml.stream.util.XMLEventConsumer; //导入方法依赖的package包/类
public void allocate(XMLStreamReader reader, XMLEventConsumer consumer)
throws XMLStreamException
{
consumer.add(allocate(reader));
}
示例4: allocate
import javax.xml.stream.util.XMLEventConsumer; //导入方法依赖的package包/类
@Override
public void allocate(XMLStreamReader r, XMLEventConsumer consumer)
throws XMLStreamException
{
consumer.add(allocate(r));
}
示例5: allocate
import javax.xml.stream.util.XMLEventConsumer; //导入方法依赖的package包/类
/**
* This method allocates an event or set of events given the current state of
* the XMLStreamReader and adds the event or set of events to the consumer that
* was passed in.
* @param streamReader The XMLStreamReader to allocate from
* @param consumer The XMLEventConsumer to add to.
*/
public void allocate(XMLStreamReader streamReader, XMLEventConsumer consumer) throws XMLStreamException {
consumer.add(getXMLEvent(streamReader));
}