com.thoughtworks.xstream.io.xml.xppdom.XppFactory.createDefaultParser()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中com.thoughtworks.xstream.io.xml.xppdom.XppFactory.createDefaultParser()方法的一些代码示例,展示了XppFactory.createDefaultParser()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XppFactory.createDefaultParser()方法的具体详情如下:
包路径:com.thoughtworks.xstream.io.xml.xppdom.XppFactory
类名称:XppFactory
方法名:createDefaultParser

XppFactory.createDefaultParser介绍

[英]Create a new XmlPullParser using the XPP factory.
[中]使用XPP工厂创建一个新的XmlPullParser。

代码示例

代码示例来源:origin: com.thoughtworks.xstream/xstream

  1. /**
  2. * Build an XPP DOM hierarchy from a Reader.
  3. *
  4. * @param r the reader
  5. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  6. * @throws IOException if the data cannot be read
  7. * @see XppDom#build(XmlPullParser)
  8. * @since 1.4.1
  9. */
  10. public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
  11. XmlPullParser parser = createDefaultParser();
  12. parser.setInput(r);
  13. return XppDom.build(parser);
  14. }

代码示例来源:origin: com.thoughtworks.xstream/xstream

  1. /**
  2. * Build an XPP DOM hierarchy from an InputStream.
  3. *
  4. * @param in the input stream
  5. * @param encoding the encoding of the input stream
  6. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  7. * @throws IOException if the data cannot be read
  8. * @see XppDom#build(XmlPullParser)
  9. * @since 1.4.1
  10. */
  11. public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
  12. XmlPullParser parser = createDefaultParser();
  13. parser.setInput(in, encoding);
  14. return XppDom.build(parser);
  15. }
  16. }

代码示例来源:origin: org.sonatype.nexus.xstream/xstream

  1. /**
  2. * Build an XPP DOM hierarchy from a Reader.
  3. *
  4. * @param r the reader
  5. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  6. * @throws IOException if the data cannot be read
  7. * @see XppDom#build(XmlPullParser)
  8. * @since 1.4.1
  9. */
  10. public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
  11. XmlPullParser parser = createDefaultParser();
  12. parser.setInput(r);
  13. return XppDom.build(parser);
  14. }

代码示例来源:origin: apache/servicemix-bundles

  1. /**
  2. * Build an XPP DOM hierarchy from a Reader.
  3. *
  4. * @param r the reader
  5. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  6. * @throws IOException if the data cannot be read
  7. * @see XppDom#build(XmlPullParser)
  8. * @since 1.4.1
  9. */
  10. public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
  11. XmlPullParser parser = createDefaultParser();
  12. parser.setInput(r);
  13. return XppDom.build(parser);
  14. }

代码示例来源:origin: x-stream/xstream

  1. /**
  2. * Build an XPP DOM hierarchy from a Reader.
  3. *
  4. * @param r the reader
  5. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  6. * @throws IOException if the data cannot be read
  7. * @see XppDom#build(XmlPullParser)
  8. * @since 1.4.1
  9. */
  10. public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
  11. XmlPullParser parser = createDefaultParser();
  12. parser.setInput(r);
  13. return XppDom.build(parser);
  14. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8

  1. /**
  2. * Build an XPP DOM hierarchy from an InputStream.
  3. *
  4. * @param in the input stream
  5. * @param encoding the encoding of the input stream
  6. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  7. * @throws IOException if the data cannot be read
  8. * @see XppDom#build(XmlPullParser)
  9. * @since 1.4.1
  10. */
  11. public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
  12. XmlPullParser parser = createDefaultParser();
  13. parser.setInput(in, encoding);
  14. return XppDom.build(parser);
  15. }
  16. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8

  1. /**
  2. * Build an XPP DOM hierarchy from a Reader.
  3. *
  4. * @param r the reader
  5. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  6. * @throws IOException if the data cannot be read
  7. * @see XppDom#build(XmlPullParser)
  8. * @since 1.4.1
  9. */
  10. public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
  11. XmlPullParser parser = createDefaultParser();
  12. parser.setInput(r);
  13. return XppDom.build(parser);
  14. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream

  1. /**
  2. * Build an XPP DOM hierarchy from a Reader.
  3. *
  4. * @param r the reader
  5. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  6. * @throws IOException if the data cannot be read
  7. * @see XppDom#build(XmlPullParser)
  8. * @since 1.4.1
  9. */
  10. public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
  11. XmlPullParser parser = createDefaultParser();
  12. parser.setInput(r);
  13. return XppDom.build(parser);
  14. }

代码示例来源:origin: com.haulmont.thirdparty/xstream

  1. /**
  2. * Build an XPP DOM hierarchy from a Reader.
  3. *
  4. * @param r the reader
  5. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  6. * @throws IOException if the data cannot be read
  7. * @see XppDom#build(XmlPullParser)
  8. * @since 1.4.1
  9. */
  10. public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
  11. XmlPullParser parser = createDefaultParser();
  12. parser.setInput(r);
  13. return XppDom.build(parser);
  14. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream

  1. /**
  2. * Build an XPP DOM hierarchy from an InputStream.
  3. *
  4. * @param in the input stream
  5. * @param encoding the encoding of the input stream
  6. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  7. * @throws IOException if the data cannot be read
  8. * @see XppDom#build(XmlPullParser)
  9. * @since 1.4.1
  10. */
  11. public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
  12. XmlPullParser parser = createDefaultParser();
  13. parser.setInput(in, encoding);
  14. return XppDom.build(parser);
  15. }
  16. }

代码示例来源:origin: x-stream/xstream

  1. /**
  2. * Build an XPP DOM hierarchy from an InputStream.
  3. *
  4. * @param in the input stream
  5. * @param encoding the encoding of the input stream
  6. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  7. * @throws IOException if the data cannot be read
  8. * @see XppDom#build(XmlPullParser)
  9. * @since 1.4.1
  10. */
  11. public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
  12. XmlPullParser parser = createDefaultParser();
  13. parser.setInput(in, encoding);
  14. return XppDom.build(parser);
  15. }
  16. }

代码示例来源:origin: com.haulmont.thirdparty/xstream

  1. /**
  2. * Build an XPP DOM hierarchy from an InputStream.
  3. *
  4. * @param in the input stream
  5. * @param encoding the encoding of the input stream
  6. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  7. * @throws IOException if the data cannot be read
  8. * @see XppDom#build(XmlPullParser)
  9. * @since 1.4.1
  10. */
  11. public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
  12. XmlPullParser parser = createDefaultParser();
  13. parser.setInput(in, encoding);
  14. return XppDom.build(parser);
  15. }
  16. }

代码示例来源:origin: org.sonatype.nexus.xstream/xstream

  1. /**
  2. * Build an XPP DOM hierarchy from an InputStream.
  3. *
  4. * @param in the input stream
  5. * @param encoding the encoding of the input stream
  6. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  7. * @throws IOException if the data cannot be read
  8. * @see XppDom#build(XmlPullParser)
  9. * @since 1.4.1
  10. */
  11. public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
  12. XmlPullParser parser = createDefaultParser();
  13. parser.setInput(in, encoding);
  14. return XppDom.build(parser);
  15. }
  16. }

代码示例来源:origin: apache/servicemix-bundles

  1. /**
  2. * Build an XPP DOM hierarchy from an InputStream.
  3. *
  4. * @param in the input stream
  5. * @param encoding the encoding of the input stream
  6. * @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
  7. * @throws IOException if the data cannot be read
  8. * @see XppDom#build(XmlPullParser)
  9. * @since 1.4.1
  10. */
  11. public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
  12. XmlPullParser parser = createDefaultParser();
  13. parser.setInput(in, encoding);
  14. return XppDom.build(parser);
  15. }
  16. }

代码示例来源:origin: org.apache.activemq/activemq-stomp

  1. switch (Transformations.getValue(transformation)) {
  2. case JMS_OBJECT_XML:
  3. in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
  4. msg = createObjectMessage(in);
  5. break;
  6. break;
  7. case JMS_MAP_XML:
  8. in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
  9. msg = createMapMessage(in);
  10. break;

代码示例来源:origin: io.fabric8.jube.images.fabric8/fabric8-mq

  1. switch (Transformations.getValue(transformation)) {
  2. case JMS_OBJECT_XML:
  3. in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
  4. msg = createObjectMessage(in);
  5. break;
  6. break;
  7. case JMS_MAP_XML:
  8. in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
  9. msg = createMapMessage(in);
  10. break;

代码示例来源:origin: org.apache.activemq/activemq-all

  1. switch (Transformations.getValue(transformation)) {
  2. case JMS_OBJECT_XML:
  3. in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
  4. msg = createObjectMessage(in);
  5. break;
  6. break;
  7. case JMS_MAP_XML:
  8. in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
  9. msg = createMapMessage(in);
  10. break;

代码示例来源:origin: io.fabric8.ipaas.apps/fabric8mq

  1. switch (Transformations.getValue(transformation)) {
  2. case JMS_OBJECT_XML:
  3. in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
  4. msg = createObjectMessage(in);
  5. break;
  6. break;
  7. case JMS_MAP_XML:
  8. in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
  9. msg = createMapMessage(in);
  10. break;

代码示例来源:origin: org.apache.activemq/activemq-osgi

  1. switch (Transformations.getValue(transformation)) {
  2. case JMS_OBJECT_XML:
  3. in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
  4. msg = createObjectMessage(in);
  5. break;
  6. break;
  7. case JMS_MAP_XML:
  8. in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
  9. msg = createMapMessage(in);
  10. break;

相关文章