Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Processing instruction [Thread Next] Re: Processing instructionTo: NULL Date: 8/3/2004 8:05:00 AM Yes, you're right.
Now it works.
Thanks a lot,
Michele
"Bjoern Hoehrmann" <bjoern@h...> ha scritto nel messaggio
news:4122d1f9.799299962@n......
> * Michele wrote in microsoft.public.xml:
> >I'm using msxml4 to insert a processing instruction inside an XML node (
> >pElementNode)
> >
> >VARIANT v1;
> > v1.vt = VT_I4;
> > V_I4(&v1) = MSXML2::NODE_PROCESSING_INSTRUCTION;
> > pPiNode = pXMLDoc->createNode(v1,_bstr_t("DEX"),L"");
> > pElement = pPiNode;
> >
lement->setAttribute("binary-file",_bstr_t("test.txt")); ----------->
> >This throw an exception
> > pElementNode->appendChild(pPiNode);
>
> Hmm, it seems you are calling setAttribute for a processing instruction
> node. That won't work, processing instructions do not have attributes,
> instead they have a target and data, IXMLDOMProcessingInstruction nodes
> have a data property you can use to set the data.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
