Initial commit
This commit is contained in:
58
sources/com/thoughtworks/xstream/io/xml/XppDomWriter.java
Normal file
58
sources/com/thoughtworks/xstream/io/xml/XppDomWriter.java
Normal file
@@ -0,0 +1,58 @@
|
||||
package com.thoughtworks.xstream.io.xml;
|
||||
|
||||
import com.thoughtworks.xstream.io.naming.NameCoder;
|
||||
import com.thoughtworks.xstream.io.xml.xppdom.XppDom;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class XppDomWriter extends AbstractDocumentWriter {
|
||||
public XppDomWriter() {
|
||||
this((XppDom) null, new XmlFriendlyNameCoder());
|
||||
}
|
||||
|
||||
private XppDom top() {
|
||||
return (XppDom) getCurrent();
|
||||
}
|
||||
|
||||
@Override // com.thoughtworks.xstream.io.HierarchicalStreamWriter
|
||||
public void addAttribute(String str, String str2) {
|
||||
top().setAttribute(encodeAttribute(str), str2);
|
||||
}
|
||||
|
||||
@Override // com.thoughtworks.xstream.io.xml.AbstractDocumentWriter
|
||||
protected Object createNode(String str) {
|
||||
XppDom xppDom = new XppDom(encodeNode(str));
|
||||
if (top() != null) {
|
||||
top().addChild(xppDom);
|
||||
}
|
||||
return xppDom;
|
||||
}
|
||||
|
||||
public XppDom getConfiguration() {
|
||||
return (XppDom) getTopLevelNodes().get(0);
|
||||
}
|
||||
|
||||
@Override // com.thoughtworks.xstream.io.HierarchicalStreamWriter
|
||||
public void setValue(String str) {
|
||||
top().setValue(str);
|
||||
}
|
||||
|
||||
public XppDomWriter(XppDom xppDom) {
|
||||
this(xppDom, new XmlFriendlyNameCoder());
|
||||
}
|
||||
|
||||
public XppDomWriter(NameCoder nameCoder) {
|
||||
this((XppDom) null, nameCoder);
|
||||
}
|
||||
|
||||
public XppDomWriter(XppDom xppDom, NameCoder nameCoder) {
|
||||
super(xppDom, nameCoder);
|
||||
}
|
||||
|
||||
public XppDomWriter(XmlFriendlyReplacer xmlFriendlyReplacer) {
|
||||
this((XppDom) null, xmlFriendlyReplacer);
|
||||
}
|
||||
|
||||
public XppDomWriter(XppDom xppDom, XmlFriendlyReplacer xmlFriendlyReplacer) {
|
||||
this(xppDom, (NameCoder) xmlFriendlyReplacer);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user