7#include "core/fxcrt/xml/cfx_xmlinstruction.h"
9#include "core/fxcrt/fx_codepage.h"
10#include "core/fxcrt/fx_extension.h"
11#include "core/fxcrt/xml/cfx_xmldocument.h"
23 auto* node = doc->CreateNode<CFX_XMLInstruction>(name_);
24 node->target_data_ = target_data_;
28void CFX_XMLInstruction::
AppendData(
const WideString& wsData) {
29 target_data_.push_back(wsData);
33 return name_.EqualsASCII(
"originalXFAVersion");
37 return name_.EqualsASCII(
"acrobat");
40void CFX_XMLInstruction::
Save(
42 if (name_.EqualsASCIINoCase(
"xml")) {
43 pXMLStream->WriteString(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
47 pXMLStream->WriteString(
"<?");
48 pXMLStream->WriteString(name_.ToUTF8().AsStringView());
49 pXMLStream->WriteString(
" ");
51 for (
const WideString& target : target_data_) {
52 pXMLStream->WriteString(target.ToUTF8().AsStringView());
53 pXMLStream->WriteString(
" ");
56 pXMLStream->WriteString(
"?>\n");
void AppendData(const WideString &wsData)
CFX_XMLInstruction(const WideString &wsTarget)
Type GetType() const override
bool IsOriginalXFAVersion() const
CFX_XMLNode * Clone(CFX_XMLDocument *doc) override
~CFX_XMLInstruction() override
void Save(const RetainPtr< IFX_RetainableWriteStream > &pXMLStream) override