wsdxmldom.h 2.24 KB
Newer Older
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
/*
 * Copyright 2017 Owen Rudge for CodeWeavers
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#ifndef __WSDXMLDOM_H__
#define __WSDXMLDOM_H__

typedef struct _WSDXML_TYPE WSDXML_TYPE;
typedef struct _WSDXML_NAMESPACE WSDXML_NAMESPACE;
typedef struct _WSDXML_NAME WSDXML_NAME;
typedef struct _WSDXML_PREFIX_MAPPING WSDXML_PREFIX_MAPPING;
typedef struct _WSDXML_ATTRIBUTE WSDXML_ATTRIBUTE;
typedef struct _WSDXML_NODE WSDXML_NODE;
typedef struct _WSDXML_ELEMENT WSDXML_ELEMENT;
29
typedef struct _WSDXML_TEXT WSDXML_TEXT;
30

31 32 33
typedef const WSDXML_NAMESPACE *PCWSDXML_NAMESPACE;
typedef const WSDXML_TYPE *PCWSDXML_TYPE;

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 86 87 88 89 90
struct _WSDXML_TYPE
{
    const WCHAR *Uri;
    const BYTE *Table;
};

struct _WSDXML_NAMESPACE
{
    const WCHAR *Uri;
    const WCHAR *PreferredPrefix;
    WSDXML_NAME *Names;
    WORD NamesCount;
    WORD Encoding;
};

struct _WSDXML_NAME
{
    WSDXML_NAMESPACE *Space;
    WCHAR *LocalName;
};

struct _WSDXML_PREFIX_MAPPING
{
    DWORD Refs;
    WSDXML_PREFIX_MAPPING *Next;
    WSDXML_NAMESPACE *Space;
    WCHAR *Prefix;
};

struct _WSDXML_ATTRIBUTE
{
    WSDXML_ELEMENT *Element;
    WSDXML_ATTRIBUTE *Next;
    WSDXML_NAME *Name;
    WCHAR *Value;
};

struct _WSDXML_NODE
{
    enum
    {
        ElementType,
        TextType
    } Type;
    WSDXML_ELEMENT *Parent;
    WSDXML_NODE *Next;
};

struct _WSDXML_ELEMENT
{
    WSDXML_NODE Node;
    WSDXML_NAME *Name;
    WSDXML_ATTRIBUTE *FirstAttribute;
    WSDXML_NODE *FirstChild;
    WSDXML_PREFIX_MAPPING *PrefixMappings;
};

91 92 93 94 95 96
struct _WSDXML_TEXT
{
    WSDXML_NODE Node;
    WCHAR *Text;
};

97
#endif /* __WSDXMLDOM_H__ */