0

I am storing some xml in XMLReader as under (read from url). There there any way I can save this to disk?

Stream^ xml= getDataStream( gcnew System::String( m_contentUrl.c_str() ) );

XmlReader^ xmlTextReader = nullptr;
xmlTextReader = XmlTextReader::Create( xml );

Thanks

7
  • possible duplicate of How to creating an XML File from a XmlReader? Commented Sep 2, 2013 at 11:57
  • This post is in C# and not C++. I want a solution in C++ Commented Sep 2, 2013 at 12:03
  • You're using CLI, right? There shouldn't be an issue with using an XmlWriter^ just as explained in that post Commented Sep 2, 2013 at 12:12
  • It does not work. When I try the following I get XmlWriter writer = XmlWriter.Create("C:\\data.xml"); error C3622: 'System::Xml::XmlWriter': a class declared as 'abstract' cannot be instantiated Commented Sep 2, 2013 at 12:15
  • Using XmlWriter^ has the same effect Commented Sep 2, 2013 at 12:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.