Grab data inside code [duplicate] - c++

This question already has answers here:
parse a xml in c++
(3 answers)
Closed 8 years ago.
So I have gotten the website source, and now im trying to grab the data inside the tags. How would I go about doing that. Thanks
For example,
<start>value</start>
Set a string to value

http://expat.sourceforge.net/ and http://msdn.microsoft.com/en-us/magazine/cc163436.aspx two more alternatives apart from http://xerces.apache.org/xerces-c/ as mentioned by mtahmed. There are plenty more. Please compare them based on your requirement.

You can use an XML parser library. Here is a link to one such library: http://xerces.apache.org/xerces-c/

Related

Handling CSV file [duplicate]

This question already has answers here:
C++ CSV line with commas and strings within double quotes
(3 answers)
Closed 5 years ago.
I am using CSV file with comma as delimiter
getline(strGetLine, word, ',')
I have a problem while reading something which as comma in between
Example -"mysentence,fromCSV"
Please let me know how to handle it.
I would recommend using a library, since this is not a new problem and has been solved several times.
The first example I can find is https://github.com/ben-strasser/fast-cpp-csv-parser, but you could also do something with Boost Spirit if you felt inclined.

Calling a .net function from C++ [duplicate]

This question already has answers here:
How do I call a .NET assembly from C/C++?
(9 answers)
Closed 8 years ago.
I want to use this function to zip up a folder from a C++ console application. No examples are given in the article of how to use the function from C++, just C# or VB, and I can't find any other code samples anywhere.
The article doesn't really even clarify whether the function is available in C++. Is this function supported in C++? And if so, how do I call it?
Thanks.
This doesn't answer your specific question of calling that .NET method you requested, but, if you want to compress some files using native C++, look at using Zlib and there is a contribution app called minizip which you can use for opening / creating zip archives.

How can I generate text from a RegEx? [duplicate]

This question already has answers here:
Using Regex to generate Strings rather than match them
(12 answers)
Reverse regular expression, create string from regex
(1 answer)
Closed 9 years ago.
Or "How can I RegEx in reverse?"
specifically I want to take a regex such as wks[0-9][0-9][0-9]
and create a list such as wks001,wks002,wks003, etc
I know the easiest way in this example would be to simply increment the number through addition, but say I want it to be even more sophisticated later on such as [0-9abc] I'd like to use a more sophisticated tool.
preferable would be some windows capable scripting tech, such as vbscript/powershell but I'm open to other alternatives. I guess I kind of thought this might be something that is done all the time by random number generators and such and would be a programming staple, but I lack the understanding to phrase it correctly I think.

What is an equivalent to instanceof in C++? [duplicate]

This question already has answers here:
C++ equivalent of java's instanceof
(5 answers)
Closed 9 years ago.
How can I check the class type in c++?
In Java I used instanceof.
I prefer not to use dynamic cast, but only classic c++.
Is there any way?
Clarification:
It isn't a duplicate of another question in StackOverflow, since I asked how can I find it without using of dynamic_cast. In the other question, the answer was to use it. Please don't mark it as a duplicated.
There is no way to check class type without RTTI or it's home brew substitution. If application compiled without RTTI information about type is not stored anywhere.

How to delete some contents from a file [duplicate]

This question already has answers here:
Delete a character from a file in C
(5 answers)
Closed 9 years ago.
I need to delete some starting contents from a text file.
Is there any way to do this.
I tried but i am not able to find any solution for this
Please help me
Thanks,
You can use external system tools to do that. In c++, such utilities can be launched using the function system()