本文整理了Java中com.thoughtworks.xstream.io.xml.xppdom.XppFactory
类的一些代码示例,展示了XppFactory
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XppFactory
类的具体详情如下:
包路径:com.thoughtworks.xstream.io.xml.xppdom.XppFactory
类名称:XppFactory
[英]XmlPullParser utility methods.
[中]XmlPullParser实用程序方法。
代码示例来源:origin: com.thoughtworks.xstream/xstream
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: com.thoughtworks.xstream/xstream
/**
* Build an XPP DOM hierarchy from a String.
*
* @param xml the XML data
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(String xml) throws XmlPullParserException, IOException {
return buildDom(new StringReader(xml));
}
代码示例来源:origin: com.thoughtworks.xstream/xstream
/**
* Build an XPP DOM hierarchy from an InputStream.
*
* @param in the input stream
* @param encoding the encoding of the input stream
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(in, encoding);
return XppDom.build(parser);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
/**
* Build an XPP DOM hierarchy from a String.
*
* @param xml the XML data
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(String xml) throws XmlPullParserException, IOException {
return buildDom(new StringReader(xml));
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
/**
* Build an XPP DOM hierarchy from a String.
*
* @param xml the XML data
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(String xml) throws XmlPullParserException, IOException {
return buildDom(new StringReader(xml));
}
代码示例来源:origin: x-stream/xstream
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Build an XPP DOM hierarchy from a String.
*
* @param xml the XML data
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(String xml) throws XmlPullParserException, IOException {
return buildDom(new StringReader(xml));
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: x-stream/xstream
/**
* Build an XPP DOM hierarchy from a String.
*
* @param xml the XML data
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(String xml) throws XmlPullParserException, IOException {
return buildDom(new StringReader(xml));
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
/**
* Build an XPP DOM hierarchy from a String.
*
* @param xml the XML data
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(String xml) throws XmlPullParserException, IOException {
return buildDom(new StringReader(xml));
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
/**
* Build an XPP DOM hierarchy from an InputStream.
*
* @param in the input stream
* @param encoding the encoding of the input stream
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(in, encoding);
return XppDom.build(parser);
}
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
/**
* Build an XPP DOM hierarchy from a String.
*
* @param xml the XML data
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(String xml) throws XmlPullParserException, IOException {
return buildDom(new StringReader(xml));
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
/**
* Build an XPP DOM hierarchy from an InputStream.
*
* @param in the input stream
* @param encoding the encoding of the input stream
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(in, encoding);
return XppDom.build(parser);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: x-stream/xstream
/**
* Build an XPP DOM hierarchy from an InputStream.
*
* @param in the input stream
* @param encoding the encoding of the input stream
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(in, encoding);
return XppDom.build(parser);
}
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
/**
* Build an XPP DOM hierarchy from an InputStream.
*
* @param in the input stream
* @param encoding the encoding of the input stream
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(in, encoding);
return XppDom.build(parser);
}
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
/**
* Build an XPP DOM hierarchy from an InputStream.
*
* @param in the input stream
* @param encoding the encoding of the input stream
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(in, encoding);
return XppDom.build(parser);
}
}
内容来源于网络,如有侵权,请联系作者删除!