vcʵÏÖxmlµÄ²Ù×÷
<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:PMingLiU;
panose-1:2 2 3 0 0 0 0 0 0 0;
mso-font-alt:ÐÂ細Ã÷體;
mso-font-charset:136;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:3 137232384 22 0 1048577 0;}
@font-face
{font-family:"\@ËÎÌå";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@PMingLiU";
panose-1:2 2 3 0 0 0 0 0 0 0;
mso-font-charset:136;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:3 137232384 22 0 1048577 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:ËÎÌå;
mso-font-kerning:1.0pt;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:1153717841;
mso-list-template-ids:842289830;}
@list l0:level1
{mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1
{mso-list-id:1918009290;
mso-list-template-ids:1961924960;}
@list l1:level1
{mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
ol
{margin-bottom:
Ïà¹ØÎĵµ£º
ʲôÊÇ XML?
XML Ö¸¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ£¨EXtensible Markup Language£©
XML ÊÇÒ»ÖÖ±ê¼ÇÓïÑÔ£¬ºÜÀàËÆ HTML
XML µÄÉè¼Æ×ÚÖ¼ÊÇ´«ÊäÊý¾Ý£¬¶ø·ÇÏÔʾÊý¾Ý
XML ±êǩûÓб»Ô¤¶¨Òå¡£ÄúÐèÒª×ÔÐж¨Òå±êÇ©¡£
XML ±»Éè¼ÆÎª¾ßÓÐ×ÔÎÒÃèÊöÐÔ¡£
XML ÊÇ W3C µÄÍÆ¼ö±ê×¼
XML Óë HTML µÄÖ÷Òª²îÒì
XML ²»ÊÇ HTML µÄÌæ´ú¡£
XML ºÍ HTML Ϊ² ......
À©Õ¹Struts2--×Ô¶¨ÒåStringºÍXML¸ñʽµÄResult
struts2ËäÈ»¼Ì³ÐÁËwebworkÓÅÐãµÄMVC·ÖÀ룬¿ÉÊÇÓÐºÜ¶àµØ·½ÈÃÈ˰Ù˼²»µÃÆä½â£¡×îÈÃÈËÀëÆ×µÄÊÇ£¬·µ»ØµÄ½á¹û¼¯ÖоÓȻûÓÐ
String£¬xmlÕâÁ½Öַdz£³£ÓõÄÀàÐÍ¡£»¹ÊÇ×Ô¼º¶¯ÊÖ£¬·áÒÂ×ãʳ£º
µÚÒ»ÖÖ·½Ê½£ºÊ¹ÓÓPlainText Result”
& ......
declare @x xml
set @x='
<ROOT>
<SM>
<SMID>88</SMID>
<SMCD>A5</SMCD>
<SMNM>ÁõÑó</SMNM>
<NDS>
<ND>
<SF>3</SF>
<NDID>88</NDID>
<NDCD>A5< ......
½â¾öÁË£¬ÊÇ1¥˵µÄ·½·¨£¬²»ÄÜд³É
context.Response.ContentType = "xml";
±ØÐëÒªÊÇ
context.Response.ContentType = "text/xml";
¾ÍOKÁË¡«
ʵÀý£º
Response.ContentType = "text/xml";
Page.Response.Write("<?xml version=\"1.0\" ......