---
title: "Discussion on \"两种将dataset写入到xml的方法\" | Hashnode"
description: "Discussion on \"两种将dataset写入到xml的方法\". 1. //mydsClone.WriteXml(MapPath(\"/Home/data.xml\"));   \n2.XmlWriter xtw = new XmlTextWriter(Server.MapPath(\"/Home/data.xml\"), \n    //生成XML\nEncoding.GetEncoding(\"utf-8\"));\n//设置encoding类型为：utf-8 \nxtw.WriteRaw(\"<?xml version=\\\\\"1.0\\\\\" encoding=\\\\\"utf-8\\\\..."
url: "https://hashnode.com/posts/datasetxml/628d95e7bc26026fa45c55b7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [两种将dataset写入到xml的方法](https://www.topzs.com/datasetxml?utm_source=hashnode&utm_medium=feed)

1\. //mydsClone.WriteXml(MapPath("/Home/data.xml")); 2.XmlWriter xtw = new XmlTextWriter(Server.MapPath("/Home/data.xml"), //生成XML Encoding.GetEncoding("utf-8")); //设置encoding类型为：utf-8 xtw.WriteRaw("<?xml version=\\\\"1.0\\\\" encoding=\\\\"utf-8\\\\...

Nov 28, 2010 · 1 min read · topzs.com  
Read the article

## Written by

[Topaz](https://hashnode.com/@tangchang)

@tangchang

  
[View profile](https://hashnode.com/@tangchang)

Front-end development

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
