summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/foundation/NSXMLElement.inc
blob: fb86ec2c29f5c84d52a09ed6d4e279565c4a84c2 (plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
{ Parsed from Foundation.framework NSXMLElement.h }

{$ifdef TYPES}
{$ifndef NSXMLELEMENT_PAS_T}
{$define NSXMLELEMENT_PAS_T}

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSXMLELEMENT_PAS_R}
{$define NSXMLELEMENT_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSXMLELEMENT_PAS_F}
{$define NSXMLELEMENT_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSXMLELEMENT_PAS_S}
{$define NSXMLELEMENT_PAS_S}

{$endif}
{$endif}

{$ifdef FORWARD}
  NSXMLElement = objcclass;
  NSXMLElementPointer = ^NSXMLElement;
  NSXMLElementPtr = NSXMLElementPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSXMLELEMENT_PAS_C}
{$define NSXMLELEMENT_PAS_C}

{ NSXMLElement }
  NSXMLElement = objcclass external (NSXMLNode)
  private
    _name: NSString;
    _attributes: NSMutableArray;
    _namespaces: NSMutableArray;
    _children: NSArray;
    _childrenHaveMutated: Boolean;
    _padding3: array[0..(3)-1] of cuint8;
    _URI: NSString;
    _prefixIndex: NSInteger;
    
  public
    function initWithName(name_: NSString): id; message 'initWithName:';
    function initWithName_URI(name_: NSString; URI_: NSString): id; message 'initWithName:URI:';
    function initWithName_stringValue(name_: NSString; string_: NSString): id; message 'initWithName:stringValue:';
    function initWithXMLString_error(string_: NSString; error: NSErrorPointer): id; message 'initWithXMLString:error:';
    function elementsForName(name_: NSString): NSArray; message 'elementsForName:';
    function elementsForLocalName_URI(localName_: NSString; URI_: NSString): NSArray; message 'elementsForLocalName:URI:';
    procedure addAttribute(attribute: NSXMLNode); message 'addAttribute:';
    procedure removeAttributeForName(name_: NSString); message 'removeAttributeForName:';
    procedure setAttributes(attributes_: NSArray); message 'setAttributes:';
    procedure setAttributesAsDictionary(attributes_: NSDictionary); message 'setAttributesAsDictionary:';
    function attributes: NSArray; message 'attributes';
    function attributeForName(name_: NSString): NSXMLNode; message 'attributeForName:';
    function attributeForLocalName_URI(localName_: NSString; URI_: NSString): NSXMLNode; message 'attributeForLocalName:URI:';
    procedure addNamespace(aNamespace: NSXMLNode); message 'addNamespace:';
    procedure removeNamespaceForPrefix(name_: NSString); message 'removeNamespaceForPrefix:';
    procedure setNamespaces(namespaces_: NSArray); message 'setNamespaces:';
    function namespaces: NSArray; message 'namespaces';
    function namespaceForPrefix(name_: NSString): NSXMLNode; message 'namespaceForPrefix:';
    function resolveNamespaceForName(name_: NSString): NSXMLNode; message 'resolveNamespaceForName:';
    function resolvePrefixForNamespaceURI(namespaceURI: NSString): NSString; message 'resolvePrefixForNamespaceURI:';
    procedure insertChild_atIndex(child: NSXMLNode; index_: NSUInteger); message 'insertChild:atIndex:';
    procedure insertChildren_atIndex(children_: NSArray; index_: NSUInteger); message 'insertChildren:atIndex:';
    procedure removeChildAtIndex(index_: NSUInteger); message 'removeChildAtIndex:';
    procedure setChildren(children_: NSArray); message 'setChildren:';
    procedure addChild(child: NSXMLNode); message 'addChild:';
    procedure replaceChildAtIndex_withNode(index_: NSUInteger; node: NSXMLNode); message 'replaceChildAtIndex:withNode:';
    procedure normalizeAdjacentTextNodesPreservingCDATA(preserve: Boolean); message 'normalizeAdjacentTextNodesPreservingCDATA:';
  end;

{$endif}
{$endif}