Chris Danger Gillett
Chris Danger Gillett

Reputation: 127

How Do I Parse XML Webpage In C++

I've been searching the internet for an hour or so, and I surrender, how do I do it?

I just want to take a webpage with a simple xml output with something simple like the weather or stock information, and have it spit out something saying, "The temperature is 90f" or "google is up". For example, http://www.google.com/ig/api?weather=New+York would say "It is 70f" or something like that.

I am extremely new to C++ and I don't know much about this, and if you are going to direct me to a library, could you please also show me a tutorial on installing new libraries? I am using visual C++ 2010, and I can't seem to find how to install new libraries.

Upvotes: 0

Views: 1160

Answers (2)

Ria
Ria

Reputation: 10347

Use Microsoft Xmlite. A Small And Fast XML Parser For Native C++. other Microsoft solutions are:

  • MSXML (SAX2) (native)
  • System.XML.XmlReader (managed)

Upvotes: 0

Albertino80
Albertino80

Reputation: 1093

You need two c++ libraries

for call the http resource http://curl.haxx.se/libcurl/

for parsing XML output http://www.grinninglizard.com/tinyxml2/index.html

Look at documentation for information about their use

Bye

Upvotes: 2

Related Questions