本文整理汇总了Java中org.xmlpull.v1.wrapper.XmlSerializerWrapper类的典型用法代码示例。如果您正苦于以下问题:Java XmlSerializerWrapper类的具体用法?Java XmlSerializerWrapper怎么用?Java XmlSerializerWrapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XmlSerializerWrapper类属于org.xmlpull.v1.wrapper包,在下文中一共展示了XmlSerializerWrapper类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: element
import org.xmlpull.v1.wrapper.XmlSerializerWrapper; //导入依赖的package包/类
public XmlSerializerWrapper element( String namespace, String elementName, String elementText ) throws IOException, XmlPullParserException {
if ( elementName == null ) {
throw new XmlPullParserException( "name for element can not be null" );
}
xs.startTag( namespace, elementName );
if ( elementText == null ) {
xs.attribute( XSI_NS, "nil", "true" );
}
else {
xs.text( elementText );
}
xs.endTag( namespace, elementName );
return this;
}
示例2: element
import org.xmlpull.v1.wrapper.XmlSerializerWrapper; //导入依赖的package包/类
public XmlSerializerWrapper element(String var1, String var2, String var3) throws IOException, XmlPullParserException {
if(var2 == null) {
throw new XmlPullParserException("name for element can not be null");
} else {
this.xs.startTag(var1, var2);
if(var3 == null) {
this.xs.attribute("http://www.w3.org/2001/XMLSchema-instance", "nil", "true");
} else {
this.xs.text(var3);
}
this.xs.endTag(var1, var2);
return this;
}
}
示例3: attribute
import org.xmlpull.v1.wrapper.XmlSerializerWrapper; //导入依赖的package包/类
public XmlSerializerWrapper attribute(String var1, String var2) throws IOException, IllegalArgumentException, IllegalStateException {
this.xs.attribute((String)null, var1, var2);
return this;
}
示例4: startTag
import org.xmlpull.v1.wrapper.XmlSerializerWrapper; //导入依赖的package包/类
public XmlSerializerWrapper startTag(String var1) throws IOException, IllegalArgumentException, IllegalStateException {
this.xs.startTag(this.currentNs, var1);
return this;
}
示例5: endTag
import org.xmlpull.v1.wrapper.XmlSerializerWrapper; //导入依赖的package包/类
public XmlSerializerWrapper endTag(String var1) throws IOException, IllegalArgumentException, IllegalStateException {
this.endTag(this.currentNs, var1);
return this;
}
示例6: attribute
import org.xmlpull.v1.wrapper.XmlSerializerWrapper; //导入依赖的package包/类
public XmlSerializerWrapper attribute( String name, String value ) throws IOException, IllegalArgumentException, IllegalStateException {
xs.attribute( null, name, value );
return this;
}
示例7: startTag
import org.xmlpull.v1.wrapper.XmlSerializerWrapper; //导入依赖的package包/类
public XmlSerializerWrapper startTag( String name ) throws IOException, IllegalArgumentException, IllegalStateException {
xs.startTag( currentNs, name );
return this;
}
示例8: endTag
import org.xmlpull.v1.wrapper.XmlSerializerWrapper; //导入依赖的package包/类
public XmlSerializerWrapper endTag( String name ) throws IOException, IllegalArgumentException, IllegalStateException {
endTag( currentNs, name );
return this;
}