summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_xmlnode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlnode.cpp')
-rw-r--r--core/fxcrt/xml/cfx_xmlnode.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/core/fxcrt/xml/cfx_xmlnode.cpp b/core/fxcrt/xml/cfx_xmlnode.cpp
index 47b3105f10..7a893af4a0 100644
--- a/core/fxcrt/xml/cfx_xmlnode.cpp
+++ b/core/fxcrt/xml/cfx_xmlnode.cpp
@@ -84,7 +84,7 @@ CFX_XMLNode* CFX_XMLNode::GetPath(const wchar_t* pPath,
if (iLength == 0) {
return nullptr;
}
- CFX_WideString csPath;
+ WideString csPath;
const wchar_t* pStart = pPath;
const wchar_t* pEnd = pPath + iLength;
wchar_t ch;
@@ -105,7 +105,7 @@ CFX_XMLNode* CFX_XMLNode::GetPath(const wchar_t* pPath,
} else if (csPath.Compare(L".") == 0) {
pFind = (CFX_XMLNode*)this;
} else {
- CFX_WideString wsTag;
+ WideString wsTag;
CFX_XMLNode* pNode = m_pChild;
while (pNode) {
if (pNode->GetType() == FX_XMLNODE_Element) {
@@ -334,7 +334,7 @@ void CFX_XMLNode::SaveXMLNode(
CFX_XMLNode* pNode = (CFX_XMLNode*)this;
switch (pNode->GetType()) {
case FX_XMLNODE_Instruction: {
- CFX_WideString ws;
+ WideString ws;
CFX_XMLInstruction* pInstruction = (CFX_XMLInstruction*)pNode;
if (pInstruction->GetName().CompareNoCase(L"xml") == 0) {
ws = L"<?xml version=\"1.0\" encoding=\"";
@@ -347,13 +347,13 @@ void CFX_XMLNode::SaveXMLNode(
ws += L"UTF-8";
}
ws += L"\"?>";
- pXMLStream->WriteString(ws.AsStringC());
+ pXMLStream->WriteString(ws.AsStringView());
} else {
ws.Format(L"<?%s", pInstruction->GetName().c_str());
- pXMLStream->WriteString(ws.AsStringC());
+ pXMLStream->WriteString(ws.AsStringView());
for (auto it : pInstruction->GetAttributes()) {
- CFX_WideString wsValue = it.second;
+ WideString wsValue = it.second;
wsValue.Replace(L"&", L"&amp;");
wsValue.Replace(L"<", L"&lt;");
wsValue.Replace(L">", L"&gt;");
@@ -365,28 +365,28 @@ void CFX_XMLNode::SaveXMLNode(
ws += L"=\"";
ws += wsValue;
ws += L"\"";
- pXMLStream->WriteString(ws.AsStringC());
+ pXMLStream->WriteString(ws.AsStringView());
}
for (auto target : pInstruction->GetTargetData()) {
ws = L" \"";
ws += target;
ws += L"\"";
- pXMLStream->WriteString(ws.AsStringC());
+ pXMLStream->WriteString(ws.AsStringView());
}
ws = L"?>";
- pXMLStream->WriteString(ws.AsStringC());
+ pXMLStream->WriteString(ws.AsStringView());
}
break;
}
case FX_XMLNODE_Element: {
- CFX_WideString ws;
+ WideString ws;
ws = L"<";
ws += static_cast<CFX_XMLElement*>(pNode)->GetName();
- pXMLStream->WriteString(ws.AsStringC());
+ pXMLStream->WriteString(ws.AsStringView());
for (auto it : static_cast<CFX_XMLElement*>(pNode)->GetAttributes()) {
- CFX_WideString wsValue = it.second;
+ WideString wsValue = it.second;
wsValue.Replace(L"&", L"&amp;");
wsValue.Replace(L"<", L"&lt;");
wsValue.Replace(L">", L"&gt;");
@@ -398,11 +398,11 @@ void CFX_XMLNode::SaveXMLNode(
ws += L"=\"";
ws += wsValue;
ws += L"\"";
- pXMLStream->WriteString(ws.AsStringC());
+ pXMLStream->WriteString(ws.AsStringView());
}
if (pNode->m_pChild) {
ws = L"\n>";
- pXMLStream->WriteString(ws.AsStringC());
+ pXMLStream->WriteString(ws.AsStringView());
CFX_XMLNode* pChild = pNode->m_pChild;
while (pChild) {
pChild->SaveXMLNode(pXMLStream);
@@ -414,24 +414,24 @@ void CFX_XMLNode::SaveXMLNode(
} else {
ws = L"\n/>";
}
- pXMLStream->WriteString(ws.AsStringC());
+ pXMLStream->WriteString(ws.AsStringView());
break;
}
case FX_XMLNODE_Text: {
- CFX_WideString ws = static_cast<CFX_XMLText*>(pNode)->GetText();
+ WideString ws = static_cast<CFX_XMLText*>(pNode)->GetText();
ws.Replace(L"&", L"&amp;");
ws.Replace(L"<", L"&lt;");
ws.Replace(L">", L"&gt;");
ws.Replace(L"\'", L"&apos;");
ws.Replace(L"\"", L"&quot;");
- pXMLStream->WriteString(ws.AsStringC());
+ pXMLStream->WriteString(ws.AsStringView());
break;
}
case FX_XMLNODE_CharData: {
- CFX_WideString ws = L"<![CDATA[";
+ WideString ws = L"<![CDATA[";
ws += static_cast<CFX_XMLCharData*>(pNode)->GetText();
ws += L"]]>";
- pXMLStream->WriteString(ws.AsStringC());
+ pXMLStream->WriteString(ws.AsStringView());
break;
}
case FX_XMLNODE_Unknown: