Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Generating XML file output?

Generating XML file output?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialdata-structuresxmlquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nisha00000
    wrote on last edited by
    #1

    Hi i have one doubt regarding how to generate XML file output for example;

    main()
    {
    int Array_sample[];
    for(int i=0;i<=10;i++)
    {
    Array_sample[i]=i;
    std::cout<<Array_sample[i]<<std::endl;
    //This is generating output but i want to write this output only print in
    // XML file how do that???

    }
    return 0;
    }

    Thanks and Regards Nisha

    enhzflepE 1 Reply Last reply
    0
    • N nisha00000

      Hi i have one doubt regarding how to generate XML file output for example;

      main()
      {
      int Array_sample[];
      for(int i=0;i<=10;i++)
      {
      Array_sample[i]=i;
      std::cout<<Array_sample[i]<<std::endl;
      //This is generating output but i want to write this output only print in
      // XML file how do that???

      }
      return 0;
      }

      Thanks and Regards Nisha

      enhzflepE Offline
      enhzflepE Offline
      enhzflep
      wrote on last edited by
      #2

      #include #include using namespace std; int main() { int Array_sample[10]; fstream myOutput; myOutput.open("test.xml", fstream::out); myOutput<<""<"<"<"<"<

      N 1 Reply Last reply
      0
      • enhzflepE enhzflep

        #include #include using namespace std; int main() { int Array_sample[10]; fstream myOutput; myOutput.open("test.xml", fstream::out); myOutput<<""<"<"<"<"<

        N Offline
        N Offline
        nisha00000
        wrote on last edited by
        #3

        you are simply writing in console print XML senerio ...i want to generate one external XML file

        A enhzflepE 2 Replies Last reply
        0
        • N nisha00000

          you are simply writing in console print XML senerio ...i want to generate one external XML file

          A Offline
          A Offline
          AndreFratelli
          wrote on last edited by
          #4

          No .. he is actually writing to a "test.xml" file.. not stdout

          myOutput.open("test.xml", fstream::out);

          regards

          Fratelli

          1 Reply Last reply
          0
          • N nisha00000

            you are simply writing in console print XML senerio ...i want to generate one external XML file

            enhzflepE Offline
            enhzflepE Offline
            enhzflep
            wrote on last edited by
            #5

            I'd normally be more polite, but you sir nisha0000, are a donkey! It creates test.xml as it's output. For ****'s sake - try actually compiling it.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups