-
Notifications
You must be signed in to change notification settings - Fork 0
/
OmniXML_MSXML.pas
73 lines (60 loc) · 2.54 KB
/
OmniXML_MSXML.pas
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
(*******************************************************************************
* The contents of this file are subject to the Mozilla Public License Version *
* 1.1 (the "License"); you may not use this file except in compliance with the *
* License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ *
* *
* Software distributed under the License is distributed on an "AS IS" basis, *
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for *
* the specific language governing rights and limitations under the License. *
* *
* The Original Code is OmniXML_MSXML.pas *
* *
* The Initial Developer of the Original Code is Miha Remec *
* http://MihaRemec.com/ *
*******************************************************************************)
unit OmniXML_MSXML;
interface
{$I OmniXML.inc}
{$IFDEF OmniXML_HasZeroBasedStrings}
{$ZEROBASEDSTRINGS OFF}
{$ENDIF}
{$IFNDEF MSWINDOWS}
{$MESSAGE FATAL 'MSXML can only be used on Windows platform'}
{$ENDIF}
uses
ComObj, {$IFDEF DELPHI6_UP} MSXML {$ELSE} MSXML2_TLB {$ENDIF};
type
IXMLDocument = IXMLDOMDocument;
IXMLText = IXMLDOMText;
IXMLElement = IXMLDOMElement;
IXMLProcessingInstruction = IXMLDOMProcessingInstruction;
IXMLCDATASection = IXMLDOMCDATASection;
IXMLComment = IXMLDOMComment;
IXMLAttr = IXMLDOMAttribute;
IXMLNodeList = IXMLDOMNodeList;
IXMLNamedNodeMap = IXMLDOMNamedNodeMap;
IXMLNode = IXMLDOMNode;
IXMLParseError = IXMLDOMParseError;
const
DEFAULT_TRUE = '1';
DEFAULT_FALSE = '0';
const
ELEMENT_NODE = NODE_ELEMENT;
ATTRIBUTE_NODE = NODE_ATTRIBUTE;
TEXT_NODE = NODE_TEXT;
CDATA_SECTION_NODE = NODE_CDATA_SECTION;
ENTITY_REFERENCE_NODE = NODE_ENTITY_REFERENCE;
ENTITY_NODE = NODE_ENTITY;
PROCESSING_INSTRUCTION_NODE = NODE_PROCESSING_INSTRUCTION;
COMMENT_NODE = NODE_COMMENT;
DOCUMENT_NODE = NODE_DOCUMENT;
DOCUMENT_TYPE_NODE = NODE_DOCUMENT_TYPE;
DOCUMENT_FRAGMENT_NODE = NODE_DOCUMENT_FRAGMENT;
NOTATION_NODE = NODE_NOTATION;
function CreateXMLDoc: IXMLDocument;
implementation
function CreateXMLDoc: IXMLDocument;
begin
Result := CreateComObject(CLASS_DOMDocument) as IXMLDOMDocument;
end;
end.