ReactOS 0.4.16-dev-2232-gc2aaa52
pi.c
Go to the documentation of this file.
1/*
2 * DOM processing instruction node implementation
3 *
4 * Copyright 2006 Huw Davies
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#define COBJMACROS
22
23#include <stdarg.h>
24#include <libxml/parser.h>
25#include <libxml/xmlerror.h>
26
27#include "windef.h"
28#include "winbase.h"
29#include "winuser.h"
30#include "ole2.h"
31#include "msxml6.h"
32
33#include "xmlparser.h"
34#include "msxml_private.h"
35
36#include "wine/debug.h"
37
39
40typedef struct _dom_pi
41{
46
47static const struct nodemap_funcs dom_pi_attr_map;
48
49static const tid_t dompi_se_tids[] = {
53};
54
56{
57 return CONTAINING_RECORD(iface, dom_pi, IXMLDOMProcessingInstruction_iface);
58}
59
63 void** ppvObject )
64{
66 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
67
68 if ( IsEqualGUID( riid, &IID_IXMLDOMProcessingInstruction ) ||
69 IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
72 {
73 *ppvObject = iface;
74 }
75 else if(node_query_interface(&This->node, riid, ppvObject))
76 {
77 return *ppvObject ? S_OK : E_NOINTERFACE;
78 }
79 else if(IsEqualGUID( riid, &IID_ISupportErrorInfo ))
80 {
82 }
83 else
84 {
85 TRACE("Unsupported interface %s\n", debugstr_guid(riid));
86 *ppvObject = NULL;
87 return E_NOINTERFACE;
88 }
89
90 IUnknown_AddRef((IUnknown*)*ppvObject);
91 return S_OK;
92}
93
96{
99 TRACE("%p, refcount %lu.\n", iface, ref);
100 return ref;
101}
102
105{
108
109 TRACE("%p, refcount %lu.\n", iface, ref);
110 if ( ref == 0 )
111 {
112 destroy_xmlnode(&This->node);
113 free(This);
114 }
115
116 return ref;
117}
118
121 UINT* pctinfo )
122{
124 return IDispatchEx_GetTypeInfoCount(&This->node.dispex.IDispatchEx_iface, pctinfo);
125}
126
129 UINT iTInfo, LCID lcid,
130 ITypeInfo** ppTInfo )
131{
133 return IDispatchEx_GetTypeInfo(&This->node.dispex.IDispatchEx_iface,
134 iTInfo, lcid, ppTInfo);
135}
136
139 REFIID riid, LPOLESTR* rgszNames,
140 UINT cNames, LCID lcid, DISPID* rgDispId )
141{
143 return IDispatchEx_GetIDsOfNames(&This->node.dispex.IDispatchEx_iface,
144 riid, rgszNames, cNames, lcid, rgDispId);
145}
146
149 DISPID dispIdMember, REFIID riid, LCID lcid,
150 WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
151 EXCEPINFO* pExcepInfo, UINT* puArgErr )
152{
154 return IDispatchEx_Invoke(&This->node.dispex.IDispatchEx_iface,
155 dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
156}
157
160 BSTR* p )
161{
163
164 TRACE("(%p)->(%p)\n", This, p);
165
166 return node_get_nodeName(&This->node, p);
167}
168
171 VARIANT* value)
172{
174
175 TRACE("(%p)->(%p)\n", This, value);
176
177 return node_get_content(&This->node, value);
178}
179
183{
185 BSTR target;
186 HRESULT hr;
187
188 TRACE("(%p)->(%s)\n", This, debugstr_variant(&value));
189
190 /* Cannot set data to a PI node whose target is 'xml' */
191 hr = IXMLDOMProcessingInstruction_get_nodeName(iface, &target);
192 if(hr == S_OK)
193 {
194 static const WCHAR xmlW[] = {'x','m','l',0};
195 if(!wcscmp(target, xmlW))
196 {
198 return E_FAIL;
199 }
200
202 }
203
204 return node_put_value(&This->node, &value);
205}
206
209 DOMNodeType* domNodeType )
210{
212
213 TRACE("(%p)->(%p)\n", This, domNodeType);
214
215 *domNodeType = NODE_PROCESSING_INSTRUCTION;
216 return S_OK;
217}
218
222{
224
225 TRACE("(%p)->(%p)\n", This, parent);
226
227 return node_get_parent(&This->node, parent);
228}
229
232 IXMLDOMNodeList** outList)
233{
235
236 TRACE("(%p)->(%p)\n", This, outList);
237
238 return node_get_child_nodes(&This->node, outList);
239}
240
243 IXMLDOMNode** domNode)
244{
246
247 TRACE("(%p)->(%p)\n", This, domNode);
248
249 return return_null_node(domNode);
250}
251
254 IXMLDOMNode** domNode)
255{
257
258 TRACE("(%p)->(%p)\n", This, domNode);
259
260 return return_null_node(domNode);
261}
262
265 IXMLDOMNode** domNode)
266{
268
269 TRACE("(%p)->(%p)\n", This, domNode);
270
271 return node_get_previous_sibling(&This->node, domNode);
272}
273
276 IXMLDOMNode** domNode)
277{
279
280 TRACE("(%p)->(%p)\n", This, domNode);
281
282 return node_get_next_sibling(&This->node, domNode);
283}
284
286{
287 xmlChar *v, q;
288 int len;
289
290 while (isspace(**p)) *p += 1;
291 if (**p != '=') return XML_E_MISSINGEQUALS;
292 *p += 1;
293
294 while (isspace(**p)) *p += 1;
295 if (**p != '"' && **p != '\'') return XML_E_MISSINGQUOTE;
296 q = **p;
297 *p += 1;
298
299 v = *p;
300 while (**p && **p != q) *p += 1;
301 if (!**p) return XML_E_BADCHARINSTRING;
302 len = *p - v;
303 if (!len) return XML_E_MISSINGNAME;
304 *p += 1;
305
306 *value = malloc(len + 1);
307 if (!*value) return E_OUTOFMEMORY;
308 memcpy(*value, v, len);
309 *(*value + len) = 0;
310
311 return S_OK;
312}
313
314static void set_prop(xmlNodePtr node, xmlAttrPtr attr)
315{
316 xmlAttrPtr prop;
317
318 if (!node->properties)
319 {
320 node->properties = attr;
321 return;
322 }
323
324 prop = node->properties;
325 while (prop->next) prop = prop->next;
326
327 prop->next = attr;
328}
329
330static HRESULT parse_xml_decl(xmlNodePtr node)
331{
332 xmlChar *version, *encoding, *standalone, *p;
333 xmlAttrPtr attr;
334 HRESULT hr = S_OK;
335
336 if (!node->content) return S_OK;
337
338 version = encoding = standalone = NULL;
339
340 p = node->content;
341
342 while (*p)
343 {
344 while (isspace(*p)) p++;
345 if (!*p) break;
346
347 if (!strncmp((const char *)p, "version", 7))
348 {
349 p += 7;
350 if ((hr = xml_get_value(&p, &version)) != S_OK) goto fail;
351 }
352 else if (!strncmp((const char *)p, "encoding", 8))
353 {
354 p += 8;
355 if ((hr = xml_get_value(&p, &encoding)) != S_OK) goto fail;
356 }
357 else if (!strncmp((const char *)p, "standalone", 10))
358 {
359 p += 10;
360 if ((hr = xml_get_value(&p, &standalone)) != S_OK) goto fail;
361 }
362 else
363 {
364 FIXME("unexpected XML attribute %s\n", debugstr_a((const char *)p));
366 goto fail;
367 }
368 }
369
370 /* xmlSetProp/xmlSetNsProp accept only nodes of type XML_ELEMENT_NODE,
371 * so we have to create and assign attributes to a node by hand.
372 */
373
374 if (version)
375 {
376 attr = xmlSetNsProp(NULL, NULL, (const xmlChar *)"version", version);
377 if (attr)
378 {
379 attr->doc = node->doc;
381 }
382 else hr = E_OUTOFMEMORY;
383 }
384 if (encoding)
385 {
386 attr = xmlSetNsProp(NULL, NULL, (const xmlChar *)"encoding", encoding);
387 if (attr)
388 {
389 attr->doc = node->doc;
391 }
392 else hr = E_OUTOFMEMORY;
393 }
394 if (standalone)
395 {
396 attr = xmlSetNsProp(NULL, NULL, (const xmlChar *)"standalone", standalone);
397 if (attr)
398 {
399 attr->doc = node->doc;
401 }
402 else hr = E_OUTOFMEMORY;
403 }
404
405fail:
406 if (hr != S_OK)
407 {
408 xmlFreePropList(node->properties);
409 node->properties = NULL;
410 }
411
412 free(version);
413 free(encoding);
414 free(standalone);
415 return hr;
416}
417
421{
423 static const WCHAR xmlW[] = {'x','m','l',0};
424 HRESULT hr;
425 BSTR name;
426
427 TRACE("(%p)->(%p)\n", This, map);
428
429 if (!map) return E_INVALIDARG;
430
431 *map = NULL;
432
433 hr = node_get_nodeName(&This->node, &name);
434 if (hr != S_OK) return hr;
435
436 if (!wcscmp(name, xmlW))
437 *map = create_nodemap(This->node.node, &dom_pi_attr_map);
438
440
441 return *map ? S_OK : S_FALSE;
442}
443
446 IXMLDOMNode* newNode, VARIANT refChild,
447 IXMLDOMNode** outOldNode)
448{
450
451 FIXME("(%p)->(%p %s %p) needs test\n", This, newNode, debugstr_variant(&refChild), outOldNode);
452
453 return node_insert_before(&This->node, newNode, &refChild, outOldNode);
454}
455
458 IXMLDOMNode* newNode,
459 IXMLDOMNode* oldNode,
460 IXMLDOMNode** outOldNode)
461{
463
464 FIXME("(%p)->(%p %p %p) needs test\n", This, newNode, oldNode, outOldNode);
465
466 return node_replace_child(&This->node, newNode, oldNode, outOldNode);
467}
468
471 IXMLDOMNode *child, IXMLDOMNode **oldChild)
472{
474 TRACE("(%p)->(%p %p)\n", This, child, oldChild);
475 return node_remove_child(&This->node, child, oldChild);
476}
477
480 IXMLDOMNode *child, IXMLDOMNode **outChild)
481{
483 TRACE("(%p)->(%p %p)\n", This, child, outChild);
484 return node_append_child(&This->node, child, outChild);
485}
486
490{
492 TRACE("(%p)->(%p)\n", This, ret);
493 return node_has_childnodes(&This->node, ret);
494}
495
498 IXMLDOMDocument **doc)
499{
501 TRACE("(%p)->(%p)\n", This, doc);
502 return node_get_owner_doc(&This->node, doc);
503}
504
507 VARIANT_BOOL deep, IXMLDOMNode** outNode)
508{
510 TRACE("(%p)->(%d %p)\n", This, deep, outNode);
511 return node_clone( &This->node, deep, outNode );
512}
513
516 BSTR* p)
517{
519 static const WCHAR processinginstructionW[] =
520 {'p','r','o','c','e','s','s','i','n','g','i','n','s','t','r','u','c','t','i','o','n',0};
521
522 TRACE("(%p)->(%p)\n", This, p);
523
524 return return_bstr(processinginstructionW, p);
525}
526
529 BSTR* p)
530{
532 TRACE("(%p)->(%p)\n", This, p);
533 return node_get_text(&This->node, p);
534}
535
538 BSTR p)
539{
541 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
542 return node_put_text( &This->node, p );
543}
544
547 VARIANT_BOOL* isSpecified)
548{
550 FIXME("(%p)->(%p) stub!\n", This, isSpecified);
551 *isSpecified = VARIANT_TRUE;
552 return S_OK;
553}
554
557 IXMLDOMNode** definitionNode)
558{
560 FIXME("(%p)->(%p)\n", This, definitionNode);
561 return E_NOTIMPL;
562}
563
566 VARIANT* v)
567{
569 TRACE("(%p)->(%p)\n", This, v);
570 return node_get_content(&This->node, v);
571}
572
575 VARIANT typedValue)
576{
578 FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue));
579 return E_NOTIMPL;
580}
581
584 VARIANT* typename)
585{
587 TRACE("(%p)->(%p)\n", This, typename);
588 return return_null_var( typename );
589}
590
593 BSTR p)
594{
596
597 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
598
599 if(!p)
600 return E_INVALIDARG;
601
602 return E_FAIL;
603}
604
607 BSTR* p)
608{
610
611 TRACE("(%p)->(%p)\n", This, p);
612
613 return node_get_xml(&This->node, FALSE, p);
614}
615
619{
621 TRACE("(%p)->(%p %p)\n", This, node, p);
622 return node_transform_node(&This->node, node, p);
623}
624
627 BSTR p, IXMLDOMNodeList** outList)
628{
630 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
631 return node_select_nodes(&This->node, p, outList);
632}
633
636 BSTR p, IXMLDOMNode** outNode)
637{
639 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode);
640 return node_select_singlenode(&This->node, p, outNode);
641}
642
645 VARIANT_BOOL* isParsed)
646{
648 FIXME("(%p)->(%p) stub!\n", This, isParsed);
649 *isParsed = VARIANT_TRUE;
650 return S_OK;
651}
652
655 BSTR* p)
656{
658 TRACE("(%p)->(%p)\n", This, p);
659 return node_get_namespaceURI(&This->node, p);
660}
661
664 BSTR* prefix)
665{
667 TRACE("(%p)->(%p)\n", This, prefix);
668 return return_null_bstr( prefix );
669}
670
673 BSTR* name)
674{
676 TRACE("(%p)->(%p)\n", This, name);
677 return node_get_base_name( &This->node, name );
678}
679
682 IXMLDOMNode* domNode, VARIANT var1)
683{
685 FIXME("(%p)->(%p %s)\n", This, domNode, debugstr_variant(&var1));
686 return E_NOTIMPL;
687}
688
691 BSTR *p)
692{
694
695 TRACE("(%p)->(%p)\n", This, p);
696
697 /* target returns the same value as nodeName property */
698 return node_get_nodeName(&This->node, p);
699}
700
703 BSTR *p)
704{
706 HRESULT hr;
707 VARIANT ret;
708
709 TRACE("(%p)->(%p)\n", This, p);
710
711 if(!p)
712 return E_INVALIDARG;
713
714 hr = IXMLDOMProcessingInstruction_get_nodeValue( iface, &ret );
715 if(hr == S_OK)
716 {
717 *p = V_BSTR(&ret);
718 }
719
720 return hr;
721}
722
725 BSTR data)
726{
728 BSTR target;
729 HRESULT hr;
730
731 TRACE("(%p)->(%s)\n", This, debugstr_w(data) );
732
733 /* cannot set data to a PI node whose target is 'xml' */
734 hr = IXMLDOMProcessingInstruction_get_nodeName(iface, &target);
735 if(hr == S_OK)
736 {
737 static const WCHAR xmlW[] = {'x','m','l',0};
738 if(!wcscmp(target, xmlW))
739 {
741 return E_FAIL;
742 }
743
745 }
746
747 return node_set_content(&This->node, data);
748}
749
751{
752 static const WCHAR xmlW[] = {'x','m','l',0};
753 xmlnode *node_obj;
754 HRESULT hr;
755 BSTR name;
756
757 if (!data)
758 return XML_E_XMLDECLSYNTAX;
759
760 node_obj = get_node_obj(node);
761 hr = node_set_content(node_obj, data);
762 if (FAILED(hr))
763 return hr;
764
765 hr = node_get_nodeName(node_obj, &name);
766 if (FAILED(hr))
767 return hr;
768
769 if (!lstrcmpW(name, xmlW) && !node_obj->node->properties)
770 hr = parse_xml_decl(node_obj->node);
771 else
772 hr = S_OK;
773
775 return hr;
776}
777
778static const struct IXMLDOMProcessingInstructionVtbl dom_pi_vtbl =
779{
823
827};
828
829static xmlAttrPtr node_has_prop(const xmlNode *node, const xmlChar *name)
830{
831 xmlAttrPtr prop;
832
833 /* xmlHasNsProp accepts only nodes of type XML_ELEMENT_NODE,
834 * so we have to look for an attribute in the node by hand.
835 */
836
837 prop = node->properties;
838
839 while (prop)
840 {
841 if (xmlStrEqual(prop->name, name))
842 return prop;
843
844 prop = prop->next;
845 }
846
847 return NULL;
848}
849
852{
853 FIXME("(%p)->(%s %s %p): stub\n", node, debugstr_w(name), debugstr_w(uri), item);
854 return E_NOTIMPL;
855}
856
858{
859 xmlChar *nameA;
860 xmlAttrPtr attr;
861
862 TRACE("(%p)->(%s %p)\n", node, debugstr_w(name), item);
863
864 if (!item) return E_POINTER;
865
866 nameA = xmlchar_from_wchar(name);
867 if (!nameA) return E_OUTOFMEMORY;
868
869 attr = node_has_prop(node, nameA);
870 free(nameA);
871
872 if (!attr)
873 {
874 *item = NULL;
875 return S_FALSE;
876 }
877
878 *item = create_node((xmlNodePtr)attr);
879
880 return S_OK;
881}
882
883static HRESULT dom_pi_set_named_item(xmlNodePtr node, IXMLDOMNode *newItem, IXMLDOMNode **namedItem)
884{
885 FIXME("(%p)->(%p %p): stub\n", node, newItem, namedItem );
886 return E_NOTIMPL;
887}
888
890{
891 FIXME("(%p)->(%s %s %p): stub\n", node, debugstr_w(name), debugstr_w(uri), item);
892 return E_NOTIMPL;
893}
894
896{
897 FIXME("(%p)->(%s %p): stub\n", node, debugstr_w(name), item);
898 return E_NOTIMPL;
899}
900
902{
903 FIXME("%p, %ld, %p: stub\n", node, index, item);
904 return E_NOTIMPL;
905}
906
907static HRESULT dom_pi_get_length(const xmlNodePtr node, LONG *length)
908{
909 FIXME("(%p)->(%p): stub\n", node, length);
910
911 *length = 0;
912 return S_OK;
913}
914
915static HRESULT dom_pi_next_node(const xmlNodePtr node, LONG *iter, IXMLDOMNode **nextNode)
916{
917 FIXME("%p, %ld, %p: stub\n", node, *iter, nextNode);
918 return E_NOTIMPL;
919}
920
921static const struct nodemap_funcs dom_pi_attr_map = {
930};
931
932static const tid_t dompi_iface_tids[] = {
934 0
935};
936
938 NULL,
940 NULL,
942};
943
944IUnknown* create_pi( xmlNodePtr pi )
945{
946 dom_pi *This;
947
948 This = malloc(sizeof(*This));
949 if ( !This )
950 return NULL;
951
952 This->IXMLDOMProcessingInstruction_iface.lpVtbl = &dom_pi_vtbl;
953 This->ref = 1;
954
955 init_xmlnode(&This->node, pi, (IXMLDOMNode*)&This->IXMLDOMProcessingInstruction_iface, &dompi_dispex);
956
957 return (IUnknown*)&This->IXMLDOMProcessingInstruction_iface;
958}
#define isspace(c)
Definition: acclib.h:69
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
const GUID IID_IUnknown
Definition: _map.h:48
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
static const WCHAR version[]
Definition: asmname.c:66
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4246
LCID lcid
Definition: locale.c:5656
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1972
_ACRTIMP int __cdecl strncmp(const char *, const char *, size_t)
Definition: string.c:3330
@ XML_E_XMLDECLSYNTAX
Definition: xmlparser.idl:109
@ XML_E_MISSINGNAME
Definition: xmlparser.idl:189
@ XML_E_MISSINGQUOTE
Definition: xmlparser.idl:104
@ XML_E_MISSINGEQUALS
Definition: xmlparser.idl:103
@ XML_E_BADCHARINSTRING
Definition: xmlparser.idl:108
return ret
Definition: mutex.c:146
r parent
Definition: btrfs.c:3010
unsigned short WORD
Definition: ntddk_ex.h:93
const GLdouble * v
Definition: gl.h:2040
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
GLuint index
Definition: glext.h:6031
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
static HRESULT create_node(HTMLDocumentNode *, nsIDOMNode *, HTMLDOMNode **)
Definition: htmlnode.c:1216
static HTMLDOMNode * get_node_obj(IHTMLDOMNode *)
Definition: htmlnode.c:1045
tid_t
Definition: ieframe.h:311
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_w
Definition: kernel32.h:32
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
static PROCESS_INFORMATION pi
Definition: debugger.c:2303
#define XML_E_UNEXPECTED_ATTRIBUTE
Definition: domdoc.c:48
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:49
const char * uri
Definition: sec_mgr.c:1588
static HWND child
Definition: cursoricon.c:298
enum tagDOMNodeType DOMNodeType
@ NODE_PROCESSING_INSTRUCTION
Definition: msxml6.idl:119
@ IXMLDOMNode_tid
Definition: msxml_dispex.h:51
@ IXMLDOMProcessingInstruction_tid
Definition: msxml_dispex.h:54
@ NULL_tid
Definition: msxml_dispex.h:38
static HRESULT return_bstr(const WCHAR *value, BSTR *p)
Definition: msxml_dispex.h:115
HRESULT node_get_next_sibling(xmlnode *, IXMLDOMNode **)
Definition: node.c:380
HRESULT node_has_childnodes(const xmlnode *, VARIANT_BOOL *)
Definition: node.c:658
HRESULT node_get_text(const xmlnode *, BSTR *)
Definition: node.c:842
HRESULT node_get_base_name(xmlnode *, BSTR *)
Definition: node.c:1622
HRESULT node_put_text(xmlnode *, BSTR)
Definition: node.c:867
HRESULT node_remove_child(xmlnode *, IXMLDOMNode *, IXMLDOMNode **)
Definition: node.c:608
HRESULT node_get_parent(xmlnode *, IXMLDOMNode **)
Definition: node.c:348
HRESULT node_replace_child(xmlnode *, IXMLDOMNode *, IXMLDOMNode *, IXMLDOMNode **)
Definition: node.c:543
static xmlChar * xmlchar_from_wchar(const WCHAR *str)
static HRESULT return_null_bstr(BSTR *p)
HRESULT node_put_value(xmlnode *, VARIANT *)
Definition: node.c:279
HRESULT node_clone(xmlnode *, VARIANT_BOOL, IXMLDOMNode **)
Definition: node.c:679
IXMLDOMNamedNodeMap * create_nodemap(xmlNodePtr, const struct nodemap_funcs *)
Definition: nodemap.c:431
HRESULT node_append_child(xmlnode *, IXMLDOMNode *, IXMLDOMNode **)
Definition: node.c:639
HRESULT node_get_previous_sibling(xmlnode *, IXMLDOMNode **)
Definition: node.c:375
HRESULT node_get_content(xmlnode *, VARIANT *)
Definition: node.c:225
HRESULT node_transform_node(const xmlnode *, IXMLDOMNode *, BSTR *)
Definition: node.c:1553
HRESULT node_select_nodes(const xmlnode *, BSTR, IXMLDOMNodeList **)
Definition: node.c:1558
static HRESULT return_null_var(VARIANT *p)
HRESULT node_set_content(xmlnode *, LPCWSTR)
Definition: node.c:241
void destroy_xmlnode(xmlnode *)
Definition: node.c:1638
HRESULT node_insert_before(xmlnode *, IXMLDOMNode *, const VARIANT *, IXMLDOMNode **)
Definition: node.c:432
HRESULT node_get_nodeName(xmlnode *, BSTR *)
Definition: node.c:178
HRESULT node_select_singlenode(const xmlnode *, BSTR, IXMLDOMNode **)
Definition: node.c:1572
void init_xmlnode(xmlnode *, xmlNodePtr, IXMLDOMNode *, dispex_static_data_t *)
Definition: node.c:1647
HRESULT node_get_owner_doc(const xmlnode *, IXMLDOMDocument **)
Definition: node.c:672
HRESULT node_get_xml(xmlnode *, BOOL, BSTR *)
Definition: node.c:936
HRESULT node_get_namespaceURI(xmlnode *, BSTR *)
Definition: node.c:1589
HRESULT node_get_child_nodes(xmlnode *, IXMLDOMNodeList **)
Definition: node.c:353
BOOL node_query_interface(xmlnode *, REFIID, void **)
Definition: node.c:66
static HRESULT return_null_node(IXMLDOMNode **p)
HRESULT node_create_supporterrorinfo(const tid_t *, void **)
static const WCHAR xmlW[]
Definition: mxnamespace.c:54
unsigned int UINT
Definition: ndis.h:50
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define V_BSTR(A)
Definition: oleauto.h:226
const GUID IID_IDispatch
long LONG
Definition: pedump.c:60
static HRESULT WINAPI dom_pi_get_xml(IXMLDOMProcessingInstruction *iface, BSTR *p)
Definition: pi.c:605
static HRESULT WINAPI dom_pi_Invoke(IXMLDOMProcessingInstruction *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: pi.c:147
static HRESULT dom_pi_remove_qualified_item(xmlNodePtr node, BSTR name, BSTR uri, IXMLDOMNode **item)
Definition: pi.c:889
IUnknown * create_pi(xmlNodePtr pi)
Definition: pi.c:944
static HRESULT WINAPI dom_pi_get_definition(IXMLDOMProcessingInstruction *iface, IXMLDOMNode **definitionNode)
Definition: pi.c:555
static HRESULT WINAPI dom_pi_get_lastChild(IXMLDOMProcessingInstruction *iface, IXMLDOMNode **domNode)
Definition: pi.c:252
static void set_prop(xmlNodePtr node, xmlAttrPtr attr)
Definition: pi.c:314
static dispex_static_data_t dompi_dispex
Definition: pi.c:937
static HRESULT WINAPI dom_pi_insertBefore(IXMLDOMProcessingInstruction *iface, IXMLDOMNode *newNode, VARIANT refChild, IXMLDOMNode **outOldNode)
Definition: pi.c:444
static HRESULT WINAPI dom_pi_transformNodeToObject(IXMLDOMProcessingInstruction *iface, IXMLDOMNode *domNode, VARIANT var1)
Definition: pi.c:680
static HRESULT WINAPI dom_pi_removeChild(IXMLDOMProcessingInstruction *iface, IXMLDOMNode *child, IXMLDOMNode **oldChild)
Definition: pi.c:469
static HRESULT WINAPI dom_pi_get_nodeTypedValue(IXMLDOMProcessingInstruction *iface, VARIANT *v)
Definition: pi.c:564
static HRESULT WINAPI dom_pi_GetIDsOfNames(IXMLDOMProcessingInstruction *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: pi.c:137
static HRESULT parse_xml_decl(xmlNodePtr node)
Definition: pi.c:330
HRESULT dom_pi_put_xml_decl(IXMLDOMNode *node, BSTR data)
Definition: pi.c:750
static HRESULT WINAPI dom_pi_GetTypeInfoCount(IXMLDOMProcessingInstruction *iface, UINT *pctinfo)
Definition: pi.c:119
static HRESULT xml_get_value(xmlChar **p, xmlChar **value)
Definition: pi.c:285
static HRESULT WINAPI dom_pi_get_nextSibling(IXMLDOMProcessingInstruction *iface, IXMLDOMNode **domNode)
Definition: pi.c:274
static HRESULT WINAPI dom_pi_get_firstChild(IXMLDOMProcessingInstruction *iface, IXMLDOMNode **domNode)
Definition: pi.c:241
static HRESULT dom_pi_get_named_item(const xmlNodePtr node, BSTR name, IXMLDOMNode **item)
Definition: pi.c:857
static HRESULT WINAPI dom_pi_get_namespaceURI(IXMLDOMProcessingInstruction *iface, BSTR *p)
Definition: pi.c:653
static ULONG WINAPI dom_pi_AddRef(IXMLDOMProcessingInstruction *iface)
Definition: pi.c:94
static HRESULT WINAPI dom_pi_get_childNodes(IXMLDOMProcessingInstruction *iface, IXMLDOMNodeList **outList)
Definition: pi.c:230
static HRESULT dom_pi_set_named_item(xmlNodePtr node, IXMLDOMNode *newItem, IXMLDOMNode **namedItem)
Definition: pi.c:883
static const tid_t dompi_iface_tids[]
Definition: pi.c:932
static HRESULT WINAPI dom_pi_transformNode(IXMLDOMProcessingInstruction *iface, IXMLDOMNode *node, BSTR *p)
Definition: pi.c:616
static const struct nodemap_funcs dom_pi_attr_map
Definition: pi.c:47
struct _dom_pi dom_pi
static HRESULT WINAPI dom_pi_get_nodeType(IXMLDOMProcessingInstruction *iface, DOMNodeType *domNodeType)
Definition: pi.c:207
static HRESULT WINAPI dom_pi_get_prefix(IXMLDOMProcessingInstruction *iface, BSTR *prefix)
Definition: pi.c:662
static HRESULT WINAPI dom_pi_get_nodeValue(IXMLDOMProcessingInstruction *iface, VARIANT *value)
Definition: pi.c:169
static HRESULT WINAPI dom_pi_put_data(IXMLDOMProcessingInstruction *iface, BSTR data)
Definition: pi.c:723
static const tid_t dompi_se_tids[]
Definition: pi.c:49
static const struct IXMLDOMProcessingInstructionVtbl dom_pi_vtbl
Definition: pi.c:778
static HRESULT dom_pi_remove_named_item(xmlNodePtr node, BSTR name, IXMLDOMNode **item)
Definition: pi.c:895
static xmlAttrPtr node_has_prop(const xmlNode *node, const xmlChar *name)
Definition: pi.c:829
static HRESULT WINAPI dom_pi_selectNodes(IXMLDOMProcessingInstruction *iface, BSTR p, IXMLDOMNodeList **outList)
Definition: pi.c:625
static dom_pi * impl_from_IXMLDOMProcessingInstruction(IXMLDOMProcessingInstruction *iface)
Definition: pi.c:55
static HRESULT WINAPI dom_pi_put_text(IXMLDOMProcessingInstruction *iface, BSTR p)
Definition: pi.c:536
static HRESULT WINAPI dom_pi_cloneNode(IXMLDOMProcessingInstruction *iface, VARIANT_BOOL deep, IXMLDOMNode **outNode)
Definition: pi.c:505
static HRESULT WINAPI dom_pi_selectSingleNode(IXMLDOMProcessingInstruction *iface, BSTR p, IXMLDOMNode **outNode)
Definition: pi.c:634
static HRESULT WINAPI dom_pi_get_data(IXMLDOMProcessingInstruction *iface, BSTR *p)
Definition: pi.c:701
static HRESULT WINAPI dom_pi_get_ownerDocument(IXMLDOMProcessingInstruction *iface, IXMLDOMDocument **doc)
Definition: pi.c:496
static HRESULT WINAPI dom_pi_get_dataType(IXMLDOMProcessingInstruction *iface, VARIANT *typename)
Definition: pi.c:582
static HRESULT WINAPI dom_pi_get_target(IXMLDOMProcessingInstruction *iface, BSTR *p)
Definition: pi.c:689
static HRESULT dom_pi_get_item(const xmlNodePtr node, LONG index, IXMLDOMNode **item)
Definition: pi.c:901
static HRESULT dom_pi_next_node(const xmlNodePtr node, LONG *iter, IXMLDOMNode **nextNode)
Definition: pi.c:915
static HRESULT WINAPI dom_pi_put_dataType(IXMLDOMProcessingInstruction *iface, BSTR p)
Definition: pi.c:591
static HRESULT WINAPI dom_pi_QueryInterface(IXMLDOMProcessingInstruction *iface, REFIID riid, void **ppvObject)
Definition: pi.c:60
static HRESULT WINAPI dom_pi_hasChildNodes(IXMLDOMProcessingInstruction *iface, VARIANT_BOOL *ret)
Definition: pi.c:487
static HRESULT WINAPI dom_pi_get_attributes(IXMLDOMProcessingInstruction *iface, IXMLDOMNamedNodeMap **map)
Definition: pi.c:418
static HRESULT WINAPI dom_pi_get_nodeName(IXMLDOMProcessingInstruction *iface, BSTR *p)
Definition: pi.c:158
static HRESULT WINAPI dom_pi_put_nodeTypedValue(IXMLDOMProcessingInstruction *iface, VARIANT typedValue)
Definition: pi.c:573
static HRESULT WINAPI dom_pi_replaceChild(IXMLDOMProcessingInstruction *iface, IXMLDOMNode *newNode, IXMLDOMNode *oldNode, IXMLDOMNode **outOldNode)
Definition: pi.c:456
static HRESULT WINAPI dom_pi_GetTypeInfo(IXMLDOMProcessingInstruction *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: pi.c:127
static HRESULT WINAPI dom_pi_get_parsed(IXMLDOMProcessingInstruction *iface, VARIANT_BOOL *isParsed)
Definition: pi.c:643
static ULONG WINAPI dom_pi_Release(IXMLDOMProcessingInstruction *iface)
Definition: pi.c:103
static HRESULT dom_pi_get_qualified_item(const xmlNodePtr node, BSTR name, BSTR uri, IXMLDOMNode **item)
Definition: pi.c:850
static HRESULT WINAPI dom_pi_get_previousSibling(IXMLDOMProcessingInstruction *iface, IXMLDOMNode **domNode)
Definition: pi.c:263
static HRESULT WINAPI dom_pi_get_parentNode(IXMLDOMProcessingInstruction *iface, IXMLDOMNode **parent)
Definition: pi.c:219
static HRESULT WINAPI dom_pi_appendChild(IXMLDOMProcessingInstruction *iface, IXMLDOMNode *child, IXMLDOMNode **outChild)
Definition: pi.c:478
static HRESULT WINAPI dom_pi_get_nodeTypeString(IXMLDOMProcessingInstruction *iface, BSTR *p)
Definition: pi.c:514
static HRESULT dom_pi_get_length(const xmlNodePtr node, LONG *length)
Definition: pi.c:907
static HRESULT WINAPI dom_pi_put_nodeValue(IXMLDOMProcessingInstruction *iface, VARIANT value)
Definition: pi.c:180
static HRESULT WINAPI dom_pi_get_specified(IXMLDOMProcessingInstruction *iface, VARIANT_BOOL *isSpecified)
Definition: pi.c:545
static HRESULT WINAPI dom_pi_get_baseName(IXMLDOMProcessingInstruction *iface, BSTR *name)
Definition: pi.c:671
static HRESULT WINAPI dom_pi_get_text(IXMLDOMProcessingInstruction *iface, BSTR *p)
Definition: pi.c:527
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
DWORD LCID
Definition: nls.h:13
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
Definition: pi.c:41
xmlnode node
Definition: pi.c:42
LONG ref
Definition: pi.c:44
IXMLDOMProcessingInstruction IXMLDOMProcessingInstruction_iface
Definition: pi.c:43
xmlNodePtr node
Definition: cookie.c:202
Definition: name.c:39
Definition: send.c:48
Definition: tools.h:99
Character const *const prefix
Definition: tempnam.cpp:195
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: dlist.c:348
void * next
Definition: dlist.c:360
Definition: pdh_main.c:96
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define E_NOINTERFACE
Definition: winerror.h:3479
#define E_POINTER
Definition: winerror.h:3480
__wchar_t WCHAR
Definition: xmlstorage.h:180
XMLPUBFUN int xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
Definition: xmlstring.c:162
unsigned char xmlChar
Definition: xmlstring.h:28