System::Xml::Serialization::XmlSerializer 类
内容
[
隐藏
]XmlSerializer class
执行对象在 XML 文档中的序列化和反序列化。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。
class XmlSerializer : public System::Object
方法
| 方法 | 描述 |
|---|---|
| virtual CanDeserialize(System::SharedPtr<XmlReader>) | 检查特定读取器是否处于可反序列化状态。 |
| Deserialize(System::SharedPtr<IO::Stream>) | 将 XML 文档反序列化为对象。 |
| Deserialize(System::SharedPtr<IO::TextReader>) | 将 XML 文档反序列化为对象。 |
| Deserialize(System::SharedPtr<XmlReader>) | 将 XML 文档反序列化为对象。 |
| Deserialize(System::SharedPtr<XmlReader>, String) | 将 XML 文档反序列化为对象。 |
| Serialize(System::SharedPtr<IO::Stream>, System::SharedPtr<Object>) | 将文档序列化为 XML。 |
| Serialize(System::SharedPtr<IO::TextWriter>, System::SharedPtr<Object>) | 将文档序列化为 XML。 |
| Serialize(System::SharedPtr<XmlWriter>, System::SharedPtr<Object>) | 将文档序列化为 XML。 |
| Serialize(System::SharedPtr<IO::Stream>, System::SharedPtr<Object>, System::SharedPtr<XmlSerializerNamespaces>) | 将文档序列化为 XML。 |
| Serialize(System::SharedPtr<IO::TextWriter>, System::SharedPtr<Object>, System::SharedPtr<XmlSerializerNamespaces>) | 将文档序列化为 XML。 |
| Serialize(System::SharedPtr<XmlWriter>, System::SharedPtr<Object>, System::SharedPtr<XmlSerializerNamespaces>) | 将文档序列化为 XML。 |
| Serialize(System::SharedPtr<XmlWriter>, System::SharedPtr<Object>, System::SharedPtr<XmlSerializerNamespaces>, String) | 将文档序列化为 XML。 |
| Serialize(System::SharedPtr<XmlWriter>, System::SharedPtr<Object>, System::SharedPtr<XmlSerializerNamespaces>, String, String) | 将文档序列化为 XML。 |
字段
| 字段 | 描述 |
|---|---|
| static EncodingNamespace | 编码命名空间名称。 |
| static WsdlNamespace | RTTI。 |
| static WsdlTypesNamespace | WSDL 类型命名空间名称。 |
另见
- Class Object
- Namespace System::Xml::Serialization
- Library Aspose.Font for C++