2 * DOM processing instruction node implementation
4 * Copyright 2006 Huw Davies
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.
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.
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
25 typedef struct _dom_pi
28 IXMLDOMProcessingInstruction IXMLDOMProcessingInstruction_iface
;
32 static const struct nodemap_funcs dom_pi_attr_map
;
34 static const tid_t dompi_se_tids
[] = {
36 IXMLDOMProcessingInstruction_tid
,
40 static inline dom_pi
*impl_from_IXMLDOMProcessingInstruction( IXMLDOMProcessingInstruction
*iface
)
42 return CONTAINING_RECORD(iface
, dom_pi
, IXMLDOMProcessingInstruction_iface
);
45 static HRESULT WINAPI
dom_pi_QueryInterface(
46 IXMLDOMProcessingInstruction
*iface
,
50 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
51 TRACE("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppvObject
);
53 if ( IsEqualGUID( riid
, &IID_IXMLDOMProcessingInstruction
) ||
54 IsEqualGUID( riid
, &IID_IXMLDOMNode
) ||
55 IsEqualGUID( riid
, &IID_IDispatch
) ||
56 IsEqualGUID( riid
, &IID_IUnknown
) )
60 else if(node_query_interface(&This
->node
, riid
, ppvObject
))
62 return *ppvObject
? S_OK
: E_NOINTERFACE
;
64 else if(IsEqualGUID( riid
, &IID_ISupportErrorInfo
))
66 return node_create_supporterrorinfo(dompi_se_tids
, ppvObject
);
70 TRACE("Unsupported interface %s\n", debugstr_guid(riid
));
75 IUnknown_AddRef((IUnknown
*)*ppvObject
);
79 static ULONG WINAPI
dom_pi_AddRef(
80 IXMLDOMProcessingInstruction
*iface
)
82 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
83 ULONG ref
= InterlockedIncrement( &This
->ref
);
84 TRACE("(%p)->(%d)\n", This
, ref
);
88 static ULONG WINAPI
dom_pi_Release(
89 IXMLDOMProcessingInstruction
*iface
)
91 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
92 ULONG ref
= InterlockedDecrement( &This
->ref
);
94 TRACE("(%p)->(%d)\n", This
, ref
);
97 destroy_xmlnode(&This
->node
);
104 static HRESULT WINAPI
dom_pi_GetTypeInfoCount(
105 IXMLDOMProcessingInstruction
*iface
,
108 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
109 return IDispatchEx_GetTypeInfoCount(&This
->node
.dispex
.IDispatchEx_iface
, pctinfo
);
112 static HRESULT WINAPI
dom_pi_GetTypeInfo(
113 IXMLDOMProcessingInstruction
*iface
,
114 UINT iTInfo
, LCID lcid
,
115 ITypeInfo
** ppTInfo
)
117 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
118 return IDispatchEx_GetTypeInfo(&This
->node
.dispex
.IDispatchEx_iface
,
119 iTInfo
, lcid
, ppTInfo
);
122 static HRESULT WINAPI
dom_pi_GetIDsOfNames(
123 IXMLDOMProcessingInstruction
*iface
,
124 REFIID riid
, LPOLESTR
* rgszNames
,
125 UINT cNames
, LCID lcid
, DISPID
* rgDispId
)
127 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
128 return IDispatchEx_GetIDsOfNames(&This
->node
.dispex
.IDispatchEx_iface
,
129 riid
, rgszNames
, cNames
, lcid
, rgDispId
);
132 static HRESULT WINAPI
dom_pi_Invoke(
133 IXMLDOMProcessingInstruction
*iface
,
134 DISPID dispIdMember
, REFIID riid
, LCID lcid
,
135 WORD wFlags
, DISPPARAMS
* pDispParams
, VARIANT
* pVarResult
,
136 EXCEPINFO
* pExcepInfo
, UINT
* puArgErr
)
138 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
139 return IDispatchEx_Invoke(&This
->node
.dispex
.IDispatchEx_iface
,
140 dispIdMember
, riid
, lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
143 static HRESULT WINAPI
dom_pi_get_nodeName(
144 IXMLDOMProcessingInstruction
*iface
,
147 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
149 TRACE("(%p)->(%p)\n", This
, p
);
151 return node_get_nodeName(&This
->node
, p
);
154 static HRESULT WINAPI
dom_pi_get_nodeValue(
155 IXMLDOMProcessingInstruction
*iface
,
158 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
160 TRACE("(%p)->(%p)\n", This
, value
);
162 return node_get_content(&This
->node
, value
);
165 static HRESULT WINAPI
dom_pi_put_nodeValue(
166 IXMLDOMProcessingInstruction
*iface
,
169 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
173 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&value
));
175 /* Cannot set data to a PI node whose target is 'xml' */
176 hr
= IXMLDOMProcessingInstruction_get_nodeName(iface
, &target
);
179 static const WCHAR xmlW
[] = {'x','m','l',0};
180 if(!strcmpW(target
, xmlW
))
182 SysFreeString(target
);
186 SysFreeString(target
);
189 return node_put_value(&This
->node
, &value
);
192 static HRESULT WINAPI
dom_pi_get_nodeType(
193 IXMLDOMProcessingInstruction
*iface
,
194 DOMNodeType
* domNodeType
)
196 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
198 TRACE("(%p)->(%p)\n", This
, domNodeType
);
200 *domNodeType
= NODE_PROCESSING_INSTRUCTION
;
204 static HRESULT WINAPI
dom_pi_get_parentNode(
205 IXMLDOMProcessingInstruction
*iface
,
206 IXMLDOMNode
** parent
)
208 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
210 TRACE("(%p)->(%p)\n", This
, parent
);
212 return node_get_parent(&This
->node
, parent
);
215 static HRESULT WINAPI
dom_pi_get_childNodes(
216 IXMLDOMProcessingInstruction
*iface
,
217 IXMLDOMNodeList
** outList
)
219 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
221 TRACE("(%p)->(%p)\n", This
, outList
);
223 return node_get_child_nodes(&This
->node
, outList
);
226 static HRESULT WINAPI
dom_pi_get_firstChild(
227 IXMLDOMProcessingInstruction
*iface
,
228 IXMLDOMNode
** domNode
)
230 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
232 TRACE("(%p)->(%p)\n", This
, domNode
);
234 return return_null_node(domNode
);
237 static HRESULT WINAPI
dom_pi_get_lastChild(
238 IXMLDOMProcessingInstruction
*iface
,
239 IXMLDOMNode
** domNode
)
241 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
243 TRACE("(%p)->(%p)\n", This
, domNode
);
245 return return_null_node(domNode
);
248 static HRESULT WINAPI
dom_pi_get_previousSibling(
249 IXMLDOMProcessingInstruction
*iface
,
250 IXMLDOMNode
** domNode
)
252 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
254 TRACE("(%p)->(%p)\n", This
, domNode
);
256 return node_get_previous_sibling(&This
->node
, domNode
);
259 static HRESULT WINAPI
dom_pi_get_nextSibling(
260 IXMLDOMProcessingInstruction
*iface
,
261 IXMLDOMNode
** domNode
)
263 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
265 TRACE("(%p)->(%p)\n", This
, domNode
);
267 return node_get_next_sibling(&This
->node
, domNode
);
270 static HRESULT WINAPI
dom_pi_get_attributes(
271 IXMLDOMProcessingInstruction
*iface
,
272 IXMLDOMNamedNodeMap
** map
)
274 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
275 static const WCHAR xmlW
[] = {'x','m','l',0};
279 TRACE("(%p)->(%p)\n", This
, map
);
281 if (!map
) return E_INVALIDARG
;
285 hr
= node_get_nodeName(&This
->node
, &name
);
286 if (hr
!= S_OK
) return hr
;
288 if (!strcmpW(name
, xmlW
))
290 FIXME("created dummy map for <?xml ?>\n");
291 *map
= create_nodemap(This
->node
.node
, &dom_pi_attr_map
);
301 static HRESULT WINAPI
dom_pi_insertBefore(
302 IXMLDOMProcessingInstruction
*iface
,
303 IXMLDOMNode
* newNode
, VARIANT refChild
,
304 IXMLDOMNode
** outOldNode
)
306 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
308 FIXME("(%p)->(%p %s %p) needs test\n", This
, newNode
, debugstr_variant(&refChild
), outOldNode
);
310 return node_insert_before(&This
->node
, newNode
, &refChild
, outOldNode
);
313 static HRESULT WINAPI
dom_pi_replaceChild(
314 IXMLDOMProcessingInstruction
*iface
,
315 IXMLDOMNode
* newNode
,
316 IXMLDOMNode
* oldNode
,
317 IXMLDOMNode
** outOldNode
)
319 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
321 FIXME("(%p)->(%p %p %p) needs test\n", This
, newNode
, oldNode
, outOldNode
);
323 return node_replace_child(&This
->node
, newNode
, oldNode
, outOldNode
);
326 static HRESULT WINAPI
dom_pi_removeChild(
327 IXMLDOMProcessingInstruction
*iface
,
328 IXMLDOMNode
*child
, IXMLDOMNode
**oldChild
)
330 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
331 TRACE("(%p)->(%p %p)\n", This
, child
, oldChild
);
332 return node_remove_child(&This
->node
, child
, oldChild
);
335 static HRESULT WINAPI
dom_pi_appendChild(
336 IXMLDOMProcessingInstruction
*iface
,
337 IXMLDOMNode
*child
, IXMLDOMNode
**outChild
)
339 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
340 TRACE("(%p)->(%p %p)\n", This
, child
, outChild
);
341 return node_append_child(&This
->node
, child
, outChild
);
344 static HRESULT WINAPI
dom_pi_hasChildNodes(
345 IXMLDOMProcessingInstruction
*iface
,
348 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
349 TRACE("(%p)->(%p)\n", This
, ret
);
350 return node_has_childnodes(&This
->node
, ret
);
353 static HRESULT WINAPI
dom_pi_get_ownerDocument(
354 IXMLDOMProcessingInstruction
*iface
,
355 IXMLDOMDocument
**doc
)
357 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
358 TRACE("(%p)->(%p)\n", This
, doc
);
359 return node_get_owner_doc(&This
->node
, doc
);
362 static HRESULT WINAPI
dom_pi_cloneNode(
363 IXMLDOMProcessingInstruction
*iface
,
364 VARIANT_BOOL deep
, IXMLDOMNode
** outNode
)
366 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
367 TRACE("(%p)->(%d %p)\n", This
, deep
, outNode
);
368 return node_clone( &This
->node
, deep
, outNode
);
371 static HRESULT WINAPI
dom_pi_get_nodeTypeString(
372 IXMLDOMProcessingInstruction
*iface
,
375 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
376 static const WCHAR processinginstructionW
[] =
377 {'p','r','o','c','e','s','s','i','n','g','i','n','s','t','r','u','c','t','i','o','n',0};
379 TRACE("(%p)->(%p)\n", This
, p
);
381 return return_bstr(processinginstructionW
, p
);
384 static HRESULT WINAPI
dom_pi_get_text(
385 IXMLDOMProcessingInstruction
*iface
,
388 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
389 TRACE("(%p)->(%p)\n", This
, p
);
390 return node_get_text(&This
->node
, p
);
393 static HRESULT WINAPI
dom_pi_put_text(
394 IXMLDOMProcessingInstruction
*iface
,
397 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
398 TRACE("(%p)->(%s)\n", This
, debugstr_w(p
));
399 return node_put_text( &This
->node
, p
);
402 static HRESULT WINAPI
dom_pi_get_specified(
403 IXMLDOMProcessingInstruction
*iface
,
404 VARIANT_BOOL
* isSpecified
)
406 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
407 FIXME("(%p)->(%p) stub!\n", This
, isSpecified
);
408 *isSpecified
= VARIANT_TRUE
;
412 static HRESULT WINAPI
dom_pi_get_definition(
413 IXMLDOMProcessingInstruction
*iface
,
414 IXMLDOMNode
** definitionNode
)
416 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
417 FIXME("(%p)->(%p)\n", This
, definitionNode
);
421 static HRESULT WINAPI
dom_pi_get_nodeTypedValue(
422 IXMLDOMProcessingInstruction
*iface
,
425 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
426 TRACE("(%p)->(%p)\n", This
, v
);
427 return node_get_content(&This
->node
, v
);
430 static HRESULT WINAPI
dom_pi_put_nodeTypedValue(
431 IXMLDOMProcessingInstruction
*iface
,
434 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
435 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&typedValue
));
439 static HRESULT WINAPI
dom_pi_get_dataType(
440 IXMLDOMProcessingInstruction
*iface
,
443 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
444 TRACE("(%p)->(%p)\n", This
, typename
);
445 return return_null_var( typename
);
448 static HRESULT WINAPI
dom_pi_put_dataType(
449 IXMLDOMProcessingInstruction
*iface
,
452 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
454 TRACE("(%p)->(%s)\n", This
, debugstr_w(p
));
462 static HRESULT WINAPI
dom_pi_get_xml(
463 IXMLDOMProcessingInstruction
*iface
,
466 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
468 TRACE("(%p)->(%p)\n", This
, p
);
470 return node_get_xml(&This
->node
, FALSE
, p
);
473 static HRESULT WINAPI
dom_pi_transformNode(
474 IXMLDOMProcessingInstruction
*iface
,
475 IXMLDOMNode
*node
, BSTR
*p
)
477 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
478 TRACE("(%p)->(%p %p)\n", This
, node
, p
);
479 return node_transform_node(&This
->node
, node
, p
);
482 static HRESULT WINAPI
dom_pi_selectNodes(
483 IXMLDOMProcessingInstruction
*iface
,
484 BSTR p
, IXMLDOMNodeList
** outList
)
486 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
487 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(p
), outList
);
488 return node_select_nodes(&This
->node
, p
, outList
);
491 static HRESULT WINAPI
dom_pi_selectSingleNode(
492 IXMLDOMProcessingInstruction
*iface
,
493 BSTR p
, IXMLDOMNode
** outNode
)
495 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
496 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(p
), outNode
);
497 return node_select_singlenode(&This
->node
, p
, outNode
);
500 static HRESULT WINAPI
dom_pi_get_parsed(
501 IXMLDOMProcessingInstruction
*iface
,
502 VARIANT_BOOL
* isParsed
)
504 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
505 FIXME("(%p)->(%p) stub!\n", This
, isParsed
);
506 *isParsed
= VARIANT_TRUE
;
510 static HRESULT WINAPI
dom_pi_get_namespaceURI(
511 IXMLDOMProcessingInstruction
*iface
,
514 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
515 TRACE("(%p)->(%p)\n", This
, p
);
516 return node_get_namespaceURI(&This
->node
, p
);
519 static HRESULT WINAPI
dom_pi_get_prefix(
520 IXMLDOMProcessingInstruction
*iface
,
523 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
524 TRACE("(%p)->(%p)\n", This
, prefix
);
525 return return_null_bstr( prefix
);
528 static HRESULT WINAPI
dom_pi_get_baseName(
529 IXMLDOMProcessingInstruction
*iface
,
532 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
533 TRACE("(%p)->(%p)\n", This
, name
);
534 return node_get_base_name( &This
->node
, name
);
537 static HRESULT WINAPI
dom_pi_transformNodeToObject(
538 IXMLDOMProcessingInstruction
*iface
,
539 IXMLDOMNode
* domNode
, VARIANT var1
)
541 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
542 FIXME("(%p)->(%p %s)\n", This
, domNode
, debugstr_variant(&var1
));
546 static HRESULT WINAPI
dom_pi_get_target(
547 IXMLDOMProcessingInstruction
*iface
,
550 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
552 TRACE("(%p)->(%p)\n", This
, p
);
554 /* target returns the same value as nodeName property */
555 return node_get_nodeName(&This
->node
, p
);
558 static HRESULT WINAPI
dom_pi_get_data(
559 IXMLDOMProcessingInstruction
*iface
,
562 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
566 TRACE("(%p)->(%p)\n", This
, p
);
571 hr
= IXMLDOMProcessingInstruction_get_nodeValue( iface
, &ret
);
580 static HRESULT WINAPI
dom_pi_put_data(
581 IXMLDOMProcessingInstruction
*iface
,
584 dom_pi
*This
= impl_from_IXMLDOMProcessingInstruction( iface
);
588 TRACE("(%p)->(%s)\n", This
, debugstr_w(data
) );
590 /* cannot set data to a PI node whose target is 'xml' */
591 hr
= IXMLDOMProcessingInstruction_get_nodeName(iface
, &target
);
594 static const WCHAR xmlW
[] = {'x','m','l',0};
595 if(!strcmpW(target
, xmlW
))
597 SysFreeString(target
);
601 SysFreeString(target
);
604 return node_set_content(&This
->node
, data
);
607 static const struct IXMLDOMProcessingInstructionVtbl dom_pi_vtbl
=
609 dom_pi_QueryInterface
,
612 dom_pi_GetTypeInfoCount
,
614 dom_pi_GetIDsOfNames
,
617 dom_pi_get_nodeValue
,
618 dom_pi_put_nodeValue
,
620 dom_pi_get_parentNode
,
621 dom_pi_get_childNodes
,
622 dom_pi_get_firstChild
,
623 dom_pi_get_lastChild
,
624 dom_pi_get_previousSibling
,
625 dom_pi_get_nextSibling
,
626 dom_pi_get_attributes
,
631 dom_pi_hasChildNodes
,
632 dom_pi_get_ownerDocument
,
634 dom_pi_get_nodeTypeString
,
637 dom_pi_get_specified
,
638 dom_pi_get_definition
,
639 dom_pi_get_nodeTypedValue
,
640 dom_pi_put_nodeTypedValue
,
644 dom_pi_transformNode
,
646 dom_pi_selectSingleNode
,
648 dom_pi_get_namespaceURI
,
651 dom_pi_transformNodeToObject
,
658 static HRESULT
dom_pi_get_qualified_item(const xmlNodePtr node
, BSTR name
, BSTR uri
,
661 FIXME("(%p)->(%s %s %p): stub\n", node
, debugstr_w(name
), debugstr_w(uri
), item
);
665 static HRESULT
dom_pi_get_named_item(const xmlNodePtr node
, BSTR name
, IXMLDOMNode
**item
)
667 FIXME("(%p)->(%s %p): stub\n", node
, debugstr_w(name
), item
);
671 static HRESULT
dom_pi_set_named_item(xmlNodePtr node
, IXMLDOMNode
*newItem
, IXMLDOMNode
**namedItem
)
673 FIXME("(%p)->(%p %p): stub\n", node
, newItem
, namedItem
);
677 static HRESULT
dom_pi_remove_qualified_item(xmlNodePtr node
, BSTR name
, BSTR uri
, IXMLDOMNode
**item
)
679 FIXME("(%p)->(%s %s %p): stub\n", node
, debugstr_w(name
), debugstr_w(uri
), item
);
683 static HRESULT
dom_pi_remove_named_item(xmlNodePtr node
, BSTR name
, IXMLDOMNode
**item
)
685 FIXME("(%p)->(%s %p): stub\n", node
, debugstr_w(name
), item
);
689 static HRESULT
dom_pi_get_item(const xmlNodePtr node
, LONG index
, IXMLDOMNode
**item
)
691 FIXME("(%p)->(%d %p): stub\n", node
, index
, item
);
695 static HRESULT
dom_pi_get_length(const xmlNodePtr node
, LONG
*length
)
697 FIXME("(%p)->(%p): stub\n", node
, length
);
703 static HRESULT
dom_pi_next_node(const xmlNodePtr node
, LONG
*iter
, IXMLDOMNode
**nextNode
)
705 FIXME("(%p)->(%d %p): stub\n", node
, *iter
, nextNode
);
709 static const struct nodemap_funcs dom_pi_attr_map
= {
710 dom_pi_get_named_item
,
711 dom_pi_set_named_item
,
712 dom_pi_remove_named_item
,
715 dom_pi_get_qualified_item
,
716 dom_pi_remove_qualified_item
,
720 static const tid_t dompi_iface_tids
[] = {
721 IXMLDOMProcessingInstruction_tid
,
725 static dispex_static_data_t dompi_dispex
= {
727 IXMLDOMProcessingInstruction_tid
,
732 IUnknown
* create_pi( xmlNodePtr pi
)
736 This
= heap_alloc( sizeof *This
);
740 This
->IXMLDOMProcessingInstruction_iface
.lpVtbl
= &dom_pi_vtbl
;
743 init_xmlnode(&This
->node
, pi
, (IXMLDOMNode
*)&This
->IXMLDOMProcessingInstruction_iface
, &dompi_dispex
);
745 return (IUnknown
*)&This
->IXMLDOMProcessingInstruction_iface
;