Save()
XmlDocument::Save(String) method
Saves the XML document to the specified file. If the specified file exists, this method overwrites it.
virtual void System::Xml::XmlDocument::Save(String filename)
Arguments
| Parameter | Type | Description |
|---|
| filename | String | The location of the file where you want to save the document. |
Exceptions
| Exception | Description |
|---|
| XmlException | The operation would not result in a well formed XML document (for example, no document element or duplicate XML declarations). |
XmlDocument::Save(SharedPtr<IO::Stream>) method
Saves the XML document to the specified stream.
virtual void System::Xml::XmlDocument::Save(SharedPtr<IO::Stream> outStream)
Arguments
Exceptions
| Exception | Description |
|---|
| XmlException | The operation would not result in a well formed XML document (for example, no document element or duplicate XML declarations). |
XmlDocument::Save(SharedPtr<IO::TextWriter>) method
Saves the XML document to the specified TextWriter.
virtual void System::Xml::XmlDocument::Save(SharedPtr<IO::TextWriter> writer)
Arguments
Exceptions
| Exception | Description |
|---|
| XmlException | The operation would not result in a well formed XML document (for example, no document element or duplicate XML declarations). |
XmlDocument::Save(SharedPtr<XmlWriter>) method
Saves the XML document to the specified XmlWriter.
virtual void System::Xml::XmlDocument::Save(SharedPtr<XmlWriter> w)
Arguments
Exceptions
| Exception | Description |
|---|
| XmlException | The operation would not result in a well formed XML document (for example, no document element or duplicate XML declarations). |
See Also