xml转化Dataset(国外英文资料).docVIP

  • 1
  • 0
  • 约1.09万字
  • 约 22页
  • 2017-06-05 发布于河南
  • 举报
xml转化Dataset(国外英文资料)

xml转化Dataset Due to many advantages such as easy sharing of XML, XML technology is increasingly applied in enterprise data processing and other fields, such as used in reports, press releases, business accounting data processing and so on. XML is fast becoming the middle layer sends data to the desktop tools, because the XML data can be through an intermediary agent and a variety of back-end (database) source integration, at present most of the database maker has to fully support the XML technology, provides a variety of powerful processing XML data. Microsoft around the core of XML provides a powerful and rapid development tool, c #, that has unprecedented development efficiency, especially in XML programming. C # provides a number of relevant classes to handle XML data, such as the class that processes the stream: XmlReader and XmlWriter; Classes of the DOM: XmlNode, Xmldocument, and XmlElement, etc. The Xpath class: XmlNavigator; XSLT class: XslTransform. Display the contents of the XML file Programming in c # realize display information method is to use an XML file. The XML document on the standard class content read a StreamReader class object, reoccupy XmlDatadocument class DataSet read XML approach to XML information into the DataSet, the DataSet is assigned to a Web in the Form of DataView again Form the DataGrid, finally by the DataBind display data, specific implementation code is as follows: Using System. Xml; / / the Namespace that must be added to the XML must be added in the References Using System. IO; / / read the Namespace that the XML file must add Then add the following code in Page_Load: Protected void Page_Load (object sender, EventArgs e) { String datafile = guest. XML / / suppose the XML file is called guest. XML StreamReader tyj = new StreamReader (server.mappath (datafile)); XmlDatadocument datadoc = new XmlDatadocument (); / / create this object to read the XML Datadoc. DataSet. ReadXml (tyj); / / read the guest. XML file contents DataGrid

文档评论(0)

1亿VIP精品文档

相关文档