|
I need to write code to simply report and extract information from the XML document. Hmm, this makes me think of PERL. Anyway, like I was saying, I don't want a parser, just some code so I can extract only the data instead of the elements. Also I just want to use Standard C++ and not MFC.
|
|
|
|
|
Perl could probably do that in one line. Something like:
perl -e '$/=undef; $_=<>; s/<.*?>/ /g; print;' < file.xml > output.txt I think $/ is the right variable to undefine to make <> slurp in the whole file, newlines and all.
--Mike--
My really out-of-date homepage
Buffy's on. Gotta go, bye!
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
That is good, but it is written in Perl. Could someone translate that into Standard C++ so I can compile it in C++?
Thanks,
Vinu.
|
|
|
|
|
I second Time Smith .
Use Expat.
It's the best SAX parser out there for C/C++ programmers
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Time Nish?
hehehe
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
LOL
Sorry Tim.
I am a bad typist!
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
If you are just going to ignore people's sugestions without even looking at them, then why come here and ask.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Hello,
Trying to bridge the gap between what I was taught in school and MFC.
In school we created Btree file structures. It occurred to me that there is probably already made classes that are more sophisticated than the ones I created in school.
Could someone point me in the right direction? Do I need to learn STL, for example?
Say, for example, I wanted to write an MFC address book. I can do that but how do I write the data to a file and then retrieve when the program is run again?
I mean, I cant see busting out my project and throwing into MFC. Seems like MFC would have a way to do such a common task. Do I need to look at CObject and serialization?
Thanks in advance.
harry
|
|
|
|
|
There is no Btree in STL or MFC (or any other library that I know of). However, I'm pretty sure that some B-tree implementations can be found on the Web
I vote pro drink
|
|
|
|
|
CObject and serialization would be a place to start. Depending on your requirements and/or ambition you may want to look at a database of some kind, Access, MSDE, etc. Otherwise simply writing and reading from a flat file or XML document may be sufficient.
|
|
|
|
|
The point of using STL or MFC containers is that you don't need to know the low-level implementation of the data structure (B-tree, AVL tree, hash table or whatever). MFC CMap class is probably what you should use for your application.
|
|
|
|
|
I want to make a combination with Alt + F12... How to make it with hooks?
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
What means "Make a combination"? If you want to handle Alt+F12 in the program, use WM_SYSKEYDOWN message handler. If you want to generate keyboard event, use keybd_event (Alt down, F12 down, F12 up, Alt up). If you want to handle Alt+F12 in keyboard hook procedure, all required information is in wParam and lParam.
|
|
|
|
|
I am trying to learn C++ and have the XP home edition on my computer. Does this mean I will not be able to create programs that have #include <iostream> in the include section of the code?
|
|
|
|
|
What have you read when you think something like that is impossible!
Well, #include is something that you write to include a file like windows.h to use functions and constants from that file... it works to use #include on any computer you want!
You are a very very very very very... beginner on C++, aren't you!?
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Well, the reason I asked is because I know XP hasn't got DOS and the book I just got has examples of code in it that have the include <iostream> in the begining. This is something I thought meant that the program is going to be a DOS type program. If it IS a DOS type program then I wont be able to see if it works on my machine. Right? I am really new to programming in hopes of someday being able to answer questions for people. If I CAN run these examples I'll have an easier time learning I think, right?
|
|
|
|
|
Garry,
The #include command simply includes a file into the current file and has nothing to do with the operating system. Also, you should be able to run DOS-like programs in a command window in XP.
You should check your compiler's instructions for building and running console applications.
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
Thanks a lot, I appreciate your help!!
|
|
|
|
|
Also, XP has DOS, it's just hiding the ability to boot to a comand line from you. You can still get to a command prompt from programs/accesories. This is the sort of window your console programs will bring up ( and I recommend writing some straight C++ to the console before playing with any windows stuff, which you appear to be doing ).
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Some of the confusion about DOS comes from MS marketing. In theory, NT hasn't ever had DOS. It always has DOS emulation.
What has confused people is MS marketing saying that XP is the death of DOS. Meaning XP wasn't built on top of a DOS kernel like 95/98/ME. I guess they didn't want to confuse anybody by reminding them that NT/W2K/XP never had a DOS.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
No. Why would that be the case?
|
|
|
|
|
I guess if he knew, he wouldn't be asking.
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
Well, I've never worked with XP so I thought maybe he had some inside scoop we've all missed somehow . Just giving him the benefit of the doubt and hoping he would explain how he came to such a doubt.
Regards,
Alvaro
|
|
|
|
|
Hello,
I was just wondering whether I should order Visual Studio.NET Beta 2 or Release Candidate. Is Beta 2 better than Release Candidate, or is it buggy since it is a beta?
Do any of them have any time periods like 30 days or so?
Thanks,
vinuk.
|
|
|
|
|
The RC is time and feature limited. I'd expect they would take steps to make sure the betas are useful enough to try and not finished enough to be viable once the proper release arrives.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|