summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_document_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_document_parser.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_document_parser.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_document_parser.cpp b/xfa/fxfa/parser/cxfa_document_parser.cpp
index 8e5ff9fbde..27d80cde15 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_document_parser.cpp
@@ -669,11 +669,9 @@ CXFA_Node* CXFA_DocumentParser::ParseAsXDPPacket_Data(
if (pParentXMLNode)
pParentXMLNode->RemoveChildNode(pXMLDocumentNode);
- ASSERT(pXMLDocumentNode->GetType() == FX_XMLNODE_Element);
- if (pXMLDocumentNode->GetType() == FX_XMLNODE_Element) {
- static_cast<CFX_XMLElement*>(pXMLDocumentNode)
- ->RemoveAttribute(L"xmlns:xfa");
- }
+ CFX_XMLElement* pElement = ToXMLElement(pXMLDocumentNode);
+ pElement->RemoveAttribute(L"xmlns:xfa");
+
// The node was either removed from the parent above, or already has no
// parent so we can take ownership.
pDataElement->AppendChild(pXMLDocumentNode);