Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Processing instruction >Thread Next - Re: Processing instruction Re: Processing instructionTo: NULL Date: 8/3/2004 1:49:00 AM * 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;
> pElement->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 | |||
|
