Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to load file buffer(XML file) to XML ?

Status
Not open for further replies.

stsilver33

Programmer
Nov 8, 2006
1
KR
Dear Experts

Firstly I've tried to find the way how to search word in Vista help file(extension is h1s file).
so I decompressed it which is compressed by LZX archives and contained some xml files.
but I'd like to store it by memory instead of making file.
I made a buffer which is stored xml file but I can't to use XML Parsing so far.
I just want to search some word from buffer.
I've tried to buffer to load by XML function(by C/C++) but
I always have exception error.

bool LoadXML(char* outbuf)
{
IXMLDOMDocumentPtr docPtr;

try{
_variant_t varOut((bool)TRUE);
varOut = docPtr->loadXML((_bstr_t)outbuf);

}

}


so I've also tried to use below
------------------------------------

IXMLDOMDocumentPtr docPtr;
-
-
-
try{
_variant_t varOut((bool)TRUE);
FILE *fp=fopen("g:\\test.xml", "rb");
fread(buf,1,sizeof(buf),fp);
varOut = docPtr->loadXML((_bstr_t)buf);

}
-------------------------------------
but I also got exception error

I have just a little experience with XML handling.

Do you have any idea with above? or other way to find word from buffer(XML)?
Please help me!!!!!!
 
I think this is more a question for C++ forum.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top