Writing XML with Managed C++

Usually never get an answer, but I'll keep trying

Page 1 of 1

5 Replies - 2362 Views - Last Post: 03 August 2009 - 06:22 PM Rate Topic: -----

#1 stephen.madden   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 64
  • Joined: 15-May 09

Writing XML with Managed C++

Posted 03 August 2009 - 11:06 AM

I developed an XML writer in C++ using Smart Pointers (MSXML). This is for the purpose of a person filling out a config dialogue and dumping data to the XML. This was all done in MFC. Well, they want us to move to Windows Forms - which I am not experienced with. Does anyone have any examples or tutorials for generating XML with Managed C++? Suggestions???
Is This A Good Question/Topic? 0
  • +

Replies To: Writing XML with Managed C++

#2 eker676   User is offline

  • Software Engineer
  • member icon

Reputation: 379
  • View blog
  • Posts: 1,833
  • Joined: 18-April 09

Re: Writing XML with Managed C++

Posted 03 August 2009 - 11:09 AM

I don't really no managed C++ but here is a search that you could look at.
http://social.msdn.m...n...%20xml&ac=3
Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades   User is offline

  • Saucy!
  • member icon

Reputation: 6260
  • View blog
  • Posts: 24,030
  • Joined: 23-August 08

Re: Writing XML with Managed C++

Posted 03 August 2009 - 11:26 AM

Google search for "writing xml with managed c++"

Is it really that difficult?

Also, go to MSDN.

System.Xml namespace
XmlWriter class
Was This Post Helpful? 0
  • +
  • -

#4 stephen.madden   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 64
  • Joined: 15-May 09

Re: Writing XML with Managed C++

Posted 03 August 2009 - 11:29 AM

View PostJackOfAllTrades, on 3 Aug, 2009 - 10:26 AM, said:



Yes, yes it is. I have searched google many times. The majority of the examples and walkthroughs are aimed at loading or querying xml files. So, thanks. I'll withhold my true thoughts.
Was This Post Helpful? 0
  • +
  • -

#5 JackOfAllTrades   User is offline

  • Saucy!
  • member icon

Reputation: 6260
  • View blog
  • Posts: 24,030
  • Joined: 23-August 08

Re: Writing XML with Managed C++

Posted 03 August 2009 - 05:39 PM

I apologize, I was a bit cranky this morning, Monday AM and all, crap weekend.

Did you check out the other links to MSDN? What exactly are you doing that you're having trouble with? Must you use C++ or is C# an option , because honestly, you're going to find more examples with that. Using the XmlWriter classes is not terribly difficult for most things, and if you're flexible in your config file demands, you can leverage the System.Configuration namespace as well.

EDIT: Actually, I stand corrected, it was the afternoon. The remainder still stands. :)
Was This Post Helpful? 0
  • +
  • -

#6 baavgai   User is offline

  • Dreaming Coder
  • member icon


Reputation: 7507
  • View blog
  • Posts: 15,558
  • Joined: 16-October 07

Re: Writing XML with Managed C++

Posted 03 August 2009 - 06:22 PM

The XmlWriter would be the way to go. However, that's an abstract class; the implementation you want is XmlTextWriter.

If you want to dump config data from a managed class, and perhaps read it back again, them you may also wish to look at System.Xml.Serialization and .NET Serialization in general.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1