 |
|
 |
I tried to compile the project file and got errors
Linking...
LINK : fatal error LNK1104: cannot open file "msxml2.lib"
Error executing link.exe.
xmlparser.exe - 1 error(s), 0 warning(s)
Can anybody help?
Thanks.
Emily
|
|
|
|
 |
|
 |
I have made an application. Tht requires msxml6. Now, suppose if client does not have msxml 6 installed then what can be done to install it on client machine ?
Please help.....
Since it searches fior the class id for creating instance of the same.
|
|
|
|
 |
|
 |
mske silence installation of msxml7.msi
http://www.microsoft.com/downloads/details.aspx?FamilyID=993C0BCF-3BCF-4009-BE21-27E85E1857B1&displaylang=en
|
|
|
|
 |
|
 |
Hi Guys,
I want to write to an xml file in c++. Any ideas will de appreciated!
William.
|
|
|
|
 |
|
 |
why not to use my sample?
it can save xml file.
|
|
|
|
 |
|
 |
If I want to serialize my custom map
like
map
(problem- with double indirection)
How to do it ?
Is there some algorithm or advices how to do it ?
I see problem - in hardly able overloading same determine Function,
for every vector,
or need to branch on more upper level -write own DetermineMember_vector_custom()function ?
I think this very good parser must be easily extensible to user's existed containers,
for the sake they do not rewrite existed code,
or convert to only predefined collections simple typing.
(PLease see also else question below about map of pointers).
|
|
|
|
 |
|
 |
I did found how to use this good package in
cases:
class Object
{
virtual determine(..);
};
1)vector < Object > vo "vector - with object"
2)map < CString, Object* > mpo "map - with pointer"
determindeMember<Object>(vo,"ID", proxy)
determindeMember<Object>(mpo,"ID", proxy)
i.e. code made for only restricted set of cases:
vector < Object* > //- work with pointers is presented
map < CString, Object > //- is there such a work- with pointers ?
?
PLease advice how to implement first two cases?
|
|
|
|
 |
|
 |
hi ,
Iam using 9 int variables in my code. Instead of it i would like to use binary.Can anyone let me know how to do it
|
|
|
|
 |
|
 |
You would be better asking this in the relevant programming forum.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
 |
|
 |
Compiler generetes the error "_check: 'function' : illegal use of explicit template arguments
" in Visual Studio .NET 2003.
template
inline bool _check(H* hr)
{
return hr!=0;
}
inline bool _check(bool hr)
{
return hr;
}
How will I be able to decide this problem ?
|
|
|
|
 |
|
 |
just remove these 2 functions.
|
|
|
|
 |
|
 |
Hi, Mike
Realy great parser! Thanx for sharing sources
We found a litle problem here:
VARIANT_BOOL vBool = m_pIXMLDOMDocument->loadXML(inputStr);
in Windows98 this function (MSDN article) works just with 2 character sets (i suppose msxml.dll has an oldest version of this interface . And when i trying to parse CP-1251 encoded document, parser returns error (throw exception, but i do not remember it's description, something like "not supported charset encoding").
If i remove MSXML namespace whis MSXML2 (by defining it in precompiled header)
#define MSXML MSXML2
...it works, but... may be you know better solution?
|
|
|
|
 |
|
 |
Hello Alex.
Thank you for your comment.
My workaround: I am using utf-8 encoding in all my XML files.
Mike.
|
|
|
|
 |
|
 |
Hi Mike
Thanx by the share
Your code is fine (a little confusing but is fine)
Tip: The limitation of charsets is a big deal (I´m brazilian and, in my case, I need to use one charset different than you)
Maybe the low score can be given by the existence of more 'popular' xml libraries (Microsoft, dundas, ec ...)
I´m, in fact, using the microsoft parser to do this job with relative easy (and this library is common language in the work)
Woody
|
|
|
|
 |
|
 |
Hi Mike..
Thanx alot for your code..Am using it in an MFC phonebook application..everything was going great (using _DEBUG build) until i tried to run a release build. What happens is like this, when my application tries to save an XML doc to a file it crashes. I I tried to walk through the debug code of the CRT and found that memory alloc. is different for debug and release.
void ZXmlParserImpl::do_save()
{
m_proxy = new XMLPrivate::XmlParserProxySave(*this);
m_document->determine(*m_proxy);
it crashes inside determine..in the release build the value of this changes while not in the debug build.By the way, there is no problem with the release built of the example code here. so i guess this is something to do with MFC headers. I'd appreciate it if you could check it and post a work-around.
Thanx alot..
Time is the best teacher; Unfortunately it kills all it's students!
|
|
|
|
 |
|
 |
Hi all,
It turns out that this problem is related to the compiler settings. This can be fixed by adding the /GR switch to the c/c++ settings in VC or ticking the Enable Run-Time Type Info. option. This is pretty tricky, i got no compile errors, no link errors and no clues in the error message when it crashes .
Hope this will save someone, somewhere, some time .
Time is the best teacher; Unfortunately it kills all it's students!
|
|
|
|
 |
|
 |
Hi ! Mike I Like your code because I like templates really great job ! but I've found that it is impossible to implement a 0 or more choice element in an XML file that has this DTD <!ELEMENT org ( group* | member*)*> <!ATTLIST memeber type (VIP | EXPERT | NORMAL | GUEST) #REQUIRED name CDATA #REQUIRED addr CDATA #IMPLIED tel CDATA #REQUIRED > <!ELEMENT group ( group* | member*)*>
I found it difficult to do without changing your original code any suggestion please
Bye Sahbi
|
|
|
|
 |
|
 |
Hello Sahbi
I am sorry I can't understand the real problem.
can you send me small sample of xml file
and tell what part of it you can't read without modification of code (you can send me it by email)
Mike.
|
|
|
|
 |
|
 |
When add attributes to the first element, for example, in your sample, I add a attribute to pipeline, when parse, it will throw a exception.
I have use your code to my project, but I feel the code which isn't convenient, so I add some macro to my project to use your code.I think add some macro to your project, it will become friendly. for example #define XML_ELEMENT() ....
|
|
|
|
 |
|
 |
I want to get the string which already to save to file. How can I can that? Thanks!!
|
|
|
|
 |
|
 |
ZXmlParser::save has second optional parameter isFile, was not implemented in this article.
change function to this :
if (SUCCEEDED(createDocument()))
{
do_save();
if(isFile)
m_pIXMLDOMDocument->save(_variant_t(outputStr));
else
outputStr = m_pIXMLDOMDocument->Getxml();
m_pIXMLDOMDocument = 0;
}
Mike.
|
|
|
|
 |
|
|
 |
|
 |
Hello After fixing the memory leaks as John Kirk posted a few threads below, the map member of the Pipeline (Pipeline::m_map) stopped getting written to saved_test.xml. The cause is the following change, from: template <class T> inline void determine(T& t,const char* str,XmlParserProxy& p,void*,common_t) { p.do_member(xmlproxy(t),str); } To: template <class T> inline void determine(T& t,const char* str,XmlParserProxy& p,void*,common_t) { XmlObject* pObj = new XMLPrivate::Value2<T>(t); p.do_member(*pObj,str); delete pObj; } I couldn't figure out why this happens, perhaps someone could help. TIA, Itay Szekely http://come.to/itay For every action, there is an equal and opposite criticism
|
|
|
|
 |
|
 |
Hi,
In the
void ZXmlParserImpl::do_save()
{
m_proxy = new XMLPrivate::XmlParserProxySave(*this);
m_document->determine(*m_proxy);
m_curnodes.clear();
}
how does m_document (a type of XmlObject) finds out its an object of type Document ? I think then the link is easy to figure out. Document ->
Pipeline.determineMember and then it calls determineMember of its other objects.
Even if the question is really dumb, pls do answer
Thanks.
|
|
|
|
 |
|
 |
it fails to handle xml header.
|
|
|
|
 |