Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: xfa/fde/xml/fde_xml.h

Issue 2067253002: Cleanup XML parser code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Review feedback Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | xfa/fde/xml/fde_xml_imp.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FDE_XML_FDE_XML_H_ 7 #ifndef XFA_FDE_XML_FDE_XML_H_
8 #define XFA_FDE_XML_FDE_XML_H_ 8 #define XFA_FDE_XML_FDE_XML_H_
9 9
10 #include "xfa/fgas/crt/fgas_stream.h" 10 #include "core/fxcrt/include/fx_system.h"
11 #include "xfa/fgas/crt/fgas_utils.h"
12 11
13 enum class FDE_XmlSyntaxResult { 12 enum class FDE_XmlSyntaxResult {
14 None, 13 None,
15 InstructionOpen, 14 InstructionOpen,
16 InstructionClose, 15 InstructionClose,
17 ElementOpen, 16 ElementOpen,
18 ElementBreak, 17 ElementBreak,
19 ElementClose, 18 ElementClose,
20 TargetName, 19 TargetName,
21 TagName, 20 TagName,
(...skipping 11 matching lines...) Expand all
33 FDE_XMLNODE_Instruction, 32 FDE_XMLNODE_Instruction,
34 FDE_XMLNODE_Element, 33 FDE_XMLNODE_Element,
35 FDE_XMLNODE_Text, 34 FDE_XMLNODE_Text,
36 FDE_XMLNODE_CharData, 35 FDE_XMLNODE_CharData,
37 }; 36 };
38 37
39 struct FDE_XMLNODE { 38 struct FDE_XMLNODE {
40 int32_t iNodeNum; 39 int32_t iNodeNum;
41 FDE_XMLNODETYPE eNodeType; 40 FDE_XMLNODETYPE eNodeType;
42 }; 41 };
43 typedef CFX_StackTemplate<FDE_XMLNODE> CFDE_XMLNodeStack;
44 42
45 FX_BOOL FDE_IsXMLValidChar(FX_WCHAR ch); 43 FX_BOOL FDE_IsXMLValidChar(FX_WCHAR ch);
46 44
47 struct FDE_XMLREADERHANDLER {
48 void* pData;
49 void (*OnTagEnter)(FDE_XMLREADERHANDLER* pThis,
50 FDE_XMLNODETYPE eType,
51 const CFX_WideString& wsTagName);
52 void (*OnTagBreak)(FDE_XMLREADERHANDLER* pThis,
53 const CFX_WideString& wsTagName);
54 void (*OnTagClose)(FDE_XMLREADERHANDLER* pThis,
55 const CFX_WideString& wsTagName);
56 void (*OnAttribute)(FDE_XMLREADERHANDLER* pThis,
57 const CFX_WideString& wsName,
58 const CFX_WideString& wsValue);
59 void (*OnData)(FDE_XMLREADERHANDLER* pThis,
60 FDE_XMLNODETYPE eType,
61 const CFX_WideString& wsValue);
62 };
63
64 #endif // XFA_FDE_XML_FDE_XML_H_ 45 #endif // XFA_FDE_XML_FDE_XML_H_
OLDNEW
« no previous file with comments | « no previous file | xfa/fde/xml/fde_xml_imp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698