Creating a valid XML processing instruction node

H

Hapa

Hello all,

we are using MSXML.dll version1 (VC++6.0) and we are trying to write into
the processing instruction node some more text to be confirm to our
customers specification.

CComBSTR PITarget = ("xml");
CComBSTR PITarget1 = ("version=\"1.0\" encoding=\"UTF-8\"");
V_I4(&NodeType) = MSXML::NODE_PROCESSING_INSTRUCTION;
CVCXMLDOMNodePtr pProcInstr=NULL;

//case 1:
HRESULT hr = m_pXMLDocumentNode->createNode(NodeType, PITarget, PITarget1,
&pProcInstr)
->>hr == 1???? and pProcInstr=0xcccccc?

//case 2:
HRESULT hr = m_pXMLDocumentNode->createNode(NodeType, PITarget, NULL,
&pProcInstr)
->>hr == 0 and pProcInstr=valid pointer


So the Node could not be created in case PITarget1 points to a string
object!
What is wrong with case 1?

Thanks
hapa.
 
M

mzdude

Hello all,

we are using MSXML.dll version1 (VC++6.0) and we are trying to write into
the processing instruction node some more text to be confirm to our
customers specification.

CComBSTR PITarget = ("xml");
CComBSTR PITarget1 = ("version=\"1.0\" encoding=\"UTF-8\"");
V_I4(&NodeType) = MSXML::NODE_PROCESSING_INSTRUCTION;
CVCXMLDOMNodePtr pProcInstr=NULL;

//case 1:
HRESULT hr = m_pXMLDocumentNode->createNode(NodeType, PITarget, PITarget1,
&pProcInstr)
->>hr == 1???? and pProcInstr=0xcccccc?

//case 2:
HRESULT hr = m_pXMLDocumentNode->createNode(NodeType, PITarget, NULL,
&pProcInstr)
->>hr == 0 and pProcInstr=valid pointer

So the Node could not be created in case PITarget1 points to a string
object!
What is wrong with case 1?

Please don't cross post. You have already recieved your answer
on microsoft.public.vc.language

http://tinyurl.com/meawv8
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top