CDataNode.java
1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa;
import com.adobe.xfa.DOMSaveOptions;
import com.adobe.xfa.Document;
import com.adobe.xfa.Element;
import com.adobe.xfa.Node;
import com.adobe.xfa.TextNode;
import com.adobe.xfa.XFA;
import java.io.IOException;
import java.io.OutputStream;
public class CDataNode
extends TextNode {
public CDataNode(Element parent, Node prevSibling, String text) {
super(parent, prevSibling, text);
this.setClass("#cdata-section", XFA.CDATANODETAG);
}
public CDataNode(Element parent, Node prevSibling, char[] text, int start, int length) {
super(parent, prevSibling, text, start, length);
this.setClass("#cdata-section", XFA.CDATANODETAG);
}
@Override
public void serialize(OutputStream sOutFile, DOMSaveOptions options, int level, Node prevSibling) throws IOException {
if (!options.canBeSaved(false, this.isDefault(false), this.isTransient())) {
return;
}
if (options.getDisplayFormat() == 2 && this.isXMLSpace() && (this.getNextXMLSibling() != null || prevSibling != null)) {
return;
}
sOutFile.write(Document.MarkupCDATAStart);
super.serialize(sOutFile, options, level, prevSibling);
sOutFile.write(Document.MarkupCDATAEnd);
}
}