Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8161853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:35:15+00:00 2026-06-06T18:35:15+00:00

This is what I’ve been trying: pugi::xml_document doc; pugi::xml_parse_result result = doc.load_file(Book.xml); // need

  • 0

This is what I’ve been trying:

pugi::xml_document doc;

pugi::xml_parse_result result = doc.load_file("Book.xml"); // need to change this

std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;

I want to do something like this:

URL url;
url = new URL("http://.....");
URLConnection ucon = url.openConnection();
ucon.connect();
pugi::xml_parse_result result = doc.load_file(url.openStream()); // need to change this

EDIT 1:

Apparently this is not possible.
http://code.google.com/p/pugixml/issues/detail?id=116

So how should I move forward?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:35:16+00:00Added an answer on June 6, 2026 at 6:35 pm

    I used the cURL library to get content from URL and save it to a string, like so:

    CURL *curl;
    CURLcode res;
    std::string readBuffer;
    
    curl = curl_easy_init();
    if(curl) {
        curl_easy_setopt(curl, CURLOPT_URL, "http:...");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
        res = curl_easy_perform(curl);
        curl_easy_cleanup(curl);
    }
    

    Then I parsed the data contained within the string:

    pugi::xml_document doc;
    pugi::xml_parse_result result = doc.load(readBuffer.c_str());
    

    Easy peasy 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This has been a rather problematic issue on numerous occasions. We have alot of
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
This has been posted, but I've tried lot of solutions found on SO and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This is really just for my own use: I would like to be able
This somehow simple task is not so simple. I can get the number of
This should be simple, but the answer is eluding me. If I've got a
this is my code that I write it but I want to use LINQ
This was resolved. The statement was in another part of the stored procedure. The
This is probably a stupid question, but how much of a security risk is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.