Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ʹÓÃXmlDocumentÀàÍê³É¶ÔXMLµÄ²é¡¢É¾¡¢Ìí¡¢¸Ä

ʹÓÃXmlDocumentÀàÍê³É¶ÔXMLµÄ²é¡¢É¾¡¢Ìí¡¢¸Ä
http://www.aspdiy.net/article/53.htm
ºǫ́C#´úÂë
  1using System;
  2using System.Collections;
  3using System.ComponentModel;
  4using System.Data;
  5using System.Drawing;
  6using System.Web;
  7using System.Web.SessionState;
  8using System.Web.UI;
  9using System.Web.UI.WebControls;
10using System.Web.UI.HtmlControls;
11//ÐÂÒýÈëÁ½¸öÃüÃû¿Õ¼ä
12using System.Xml;
13using System.Xml.XPath;
14
15namespace XML
16{
17    /**//// <summary>
18    /// xdoc µÄժҪ˵Ã÷¡£
19    /// </summary>
20    public class xdoc : System.Web.UI.Page
21    {
22        protected System.Web.UI.WebControls.Label Label1;
23        protected System.Web.UI.WebControls.Label Label2;
24        protected System.Web.UI.WebControls.Button Button1;
25        protected System.Web.UI.WebControls.Label Label3;
26        protected System.Web.UI.WebControls.Button Button2;
27        protected System.Web.UI.WebControls.Button Button3;
28        protected System.Web.UI.WebControls.DataGrid dg;
29        protected System.Web.UI.WebControls.DropDownList ddl;
30        protected System.Web.UI.WebControls.TextBox tbn;
31        protected System.Web.UI.WebControls.Label Label4;
32        protected System.Web.UI.WebControls.Label Label5;
33        protected System.Web


Ïà¹ØÎĵµ£º

XmlÖеĽڵã»òÊôÐÔֵȥ¿Õ°×

<Records>
<Record>
<id>1 </id>
<name>ÀîËÄ </name>
</Record>
<Record>
<id>2 </id>
<name>ÕÅÈý </name>
</Record>
<Record>
<id>3 </id>
<name>ÍõÎå </name>
</Record& ......

C#ÖвÙ×÷XML Node½Úµãϸ½Ú²Ù×÷

ÓõÄÊÇÒ»Öֺܱ¿µÄ·½·¨£¬µ«¿ÉÒÔ°ïÖú³õѧÕßÁ˽â·ÃÎÊXML½ÚµãµÄ¹ý³Ì¡£
ÒÑÖªÓÐÒ»¸öXMLÎļþ£¨bookstore.xml£©ÈçÏÂ:
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
  <book genre="fantasy" ISBN="2-3631-4">
    <title>Oberon's Legacy</title>
  &n ......

ÓÃJAXB´æÈ¡XMLÊý¾Ý

JAXB¸ÅÒª
JAXBΪJava Architecture for XML BindingµÄËõд£¬ÒâΪXML°ó¶¨µÄJAVA¿ò¼Ü¡£ËüÌṩÁËÒ»Ì׿ÉÒÔ¼òµ¥´æÈ¡XMLÊý¾ÝµÄAPI£¬Í¬Ê±£¬JAXB¿ÉÒÔ¸ù¾ÝXMLµÄschema×Ô¶¯Éú³É²Ù×÷XMLµÄJAVAÀà¡£ÀûÓÃJAXB£¬Ê¹ÓÃJAXB×Ô¶¯Éú³ÉµÄ²Ù×÷XMLµÄJAVAÀ࣬¿ÉÒÔ»ù±¾Éϲ»Óÿ¼ÂÇXML½á¹¹¶ø¼òµ¥µØ´æÈ¡XMLÊý¾Ý¡£
JAXBµÄÏÂÔØÓë°²×°
JAXBÖÁÉÙÐèÒªµ¼ÈëÒ ......

xml post(C#)

xmlpost by HttpWebRequest:
protected string PostXmlToURL(string url,string data)
{
    HttpWebRequest hwr = (HttpWebRequest)HttpWebRequest.Create(url);
    hwr.Method = "POST";
    Stream stream = hwr.GetRequestStream();
    StreamWri ......

QTÖÐʹÓÃQXmlStreamReader½âÎöXMLÎļþ

XMLÎļþÓÉÓÚÆäÀ©Õ¹ÐÔÓë¼æÈÝÐÔµÄÓŵ㣬±»¹ã·ºÓÃ×÷Èí¼þºÍϵͳµÄÅäÖÃÎļþ¡£ÕâÀï¼òÒª½éÉÜÒ»ÏÂQTÏÂÈçºÎÀ´½âÎöXMLÎļþ¡£
Ô´´úÂ룺
xml_reader.h
#ifndef XML_READER_H
#define XML_READER_H
#include <QtCore>
//#include <QtGui>
class xml_reader : public QXmlStreamReader
{
//Q_OBJECT
public:
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ