|
The XML parser library has no bearing on whether your application is GUI or console - that's up to you. Use the TinyXML code and integrate it into your GUI application - that's your job, not the library's.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
I have use GUI feature in my project...
So, pls help me...
Is there any other XML parser with GUI mode...
GUI like: Editor page in that read xml file, parse and generate tree structure dor that code..
After that i wil use that in another application as input.
Pls provide me links and suggestions...
Thanks...
|
|
|
|
|
savitha87k wrote: Is there any other XML parser with GUI mode...
You just don't get it, do you - an XML parser does not care whether or not your program is a GUI or console mode. It's independent of that.
savitha87k wrote: GUI like: Editor page in that read xml file, parse and generate tree structure dor that code
savitha87k wrote: Pls provide me links and suggestions
links[^]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
thanks
But when i run tinxml it will automatically takes input file..
If i want to give any other xml file so,, how can i do that in tinxml...
How to input XML file...
thanks...
|
|
|
|
|
From the TinyXML documentation[^]:
TinyXML is a simple, small, C++ XML parser that can be easily integrated into other programs
savitha87k wrote: But when i run tinxml it will automatically takes input file..
If i want to give any other xml file so,, how can i do that in tinxml
Again, looking at the TinyXML documentation, specifically TiXmlDocument::Parse[^]
Parse the given null terminated block of xml data.
Passing in an encoding to this method (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml to use that encoding, regardless of what TinyXml might otherwise try to detect.
i.e. you can pass a string to the Parse method of TiXmlDocument. That string can have come from anywhere. If you look at the xmltest.cpp file that comes in the source distribution of TinyXml, you'll see code that looks like this (I've left some code out where it doesn't have any impact on this bit):
const char* demoStart =
"<?xml version=\"1.0\" standalone='no' >\n"
"<!-- Our to do list data -->"
"<ToDo>\n"
"<!-- Do I need a secure PDA? -->\n"
"<Item priority=\"1\" distance='close'> Go to the <bold>Toy store!</bold></Item>"
"<Item priority=\"2\" distance='none'> Do bills </Item>"
"<Item priority=\"2\" distance='far & back'> Look for Evil Dinosaurs! </Item>"
"</ToDo>";
{
TiXmlDocument doc( "demotest.xml" );
doc.Parse( demoStart );
That bit of code parses a string to produce an XML DOM in the variable called doc .
Another XML library option is RapidXML[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
thanks..
I have to run that code on linux platform..
could u pls tel which platform it supports and how to run step by step process...
|
|
|
|
|
This, I found from the project page[^] at sourceforge.net:
Operating System : All 32-bit MS Windows (95/98/NT/2000/XP), All POSIX (Linux/BSD/UNIX-like OSes), OS Portable (Source code to work with many OS platforms), Linux
For more details, I'm afraid you'll have to read the manual.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: For more details, I'm afraid you'll have to read the manual.
Hey man: a student cannot expected to do such an effort!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: Hey man: a student cannot expected to do such an effort!
Yes, yes. It was spelled out in our contract. I forgot.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: I forgot.
You cheater. Everyone here knows about your memory!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
thanks..
before itself i saw that OS details..
But the thing is so many files are there so just to clear knowledge which file i should run like main file....
sorry if this hurts any one.. but its urgent for me to know...
Thanks in advance....
|
|
|
|
|
thanks to all..
I will get back to you if i need any clarifications...
Thanks for your help...
|
|
|
|
|
savitha87k wrote: I have to develop XML Parser...
If you have a source code to develop XML Parser...
Don't those two statemets contradict each other?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Dear All,
I didnt get any satisfactory answer to my question regarding the same subject which i posted on 13th of this month.Anybody knowing how to find out whether a SCSI hard disk is SMART supported or not using MFC.Its urgent.
Thanks
|
|
|
|
|
Yes It is.
|
|
|
|
|
Thanks for your reply.But please tell me how to find out whether a SCSI hard disk is SMART supported or not using MFC.
|
|
|
|
|
hi
in a dialog when i hit a button some robust calculations begin. they may take a long time and the user may decide to cancel them and examine another parameters. i put a button for this purpose, but how can it be hit while the program is still busy with th e calculations begun by hitting the other button? the code is not yet done its job and the function is not yet returned from. so the hit button message cannot be processed until returning from the function.
this happens mostly in such programs. what's the routine and the best way to resolve it and what's the method used in such cases?
thx
|
|
|
|
|
Windows needs to be given control, so it can route messages (like the 'button has been clicked' message) around your program.
The usual solution is to do your long calculation in a worker thread[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
If your calculation is just a calculation and never refers any other resources,
I recommend the calculation is to be a thread and dialog button kickes start and stop only.
I figure it very simply like belows.
unsinged __stdcall calculation(void*)
{
}
void CMyDialog::OnStart() {
m_threadHandle = (HANDLE)_beginthreadex(NULL, 0, calculation, NULL, 0, &m_threadId);
};
void CMyDialog::OnCancel() {
if (m_threadHandle) {
TerminateThread(m_threadHandle, 0x13);
CloseHandle(m_threadHandle);
}
};
Consider the calculation() must be thread-safe and makes no resource leaks.
If your calculation refers some other resources and should not be killed by TerminateThread(), another method is a stop flag refernce inside a loop.
like;
void calc(bool volatile f_stop) {
for () {
for () {
for () {
if (f_stop) goto exit_all_loop;
}
}
}
exit_all_loop:
}
The function calc() is to be well designed at a point of cleaning up and performance trade-off.
|
|
|
|
|
thank u for ur suggestions,
so u think i've to use a separated thread for this purpose?
is it the best way? what if i want to avoid multi-threading problems by keeping it a single-thread app?
|
|
|
|
|
I think multi-threaded model is best practice for these case.
Another approach is message processing like windows 3.1 ages programming style.
Like this;
bool f_stop = false;
void CMyDialog::OnCancel() {
::f_stop = true;
}
void Yield() {
MSG msg;
for (int j = 0; j < 100; j++) {
if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) {
DispatchMessage(&msg);
}
}
}
void calc() {
for () {
for () {
for() {
Yield();
if (f_stop) goto exit_all_loop;
}
}
}
exit_all_loop:
}
Above is rather old style but suitable some situations; (hate multi-threading or so.)
But consider this code makes calc() so slower, so I think multi-threading is better.
|
|
|
|
|
i think it's better to comply with using a thread for this purpose. it's better not to alter the ordinary msg loop functionality. it does additional works like TranslateMessage, calling application's OnIdle, etc. which i don't intend to implement separately nor to lose what they do.
thank u very much
|
|
|
|
|
|
See here[^]
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|