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

xmlµÄÐòÁл¯ºÍ·´ÐòÁл¯

XMLÐòÁл¯Óë·´ÐòÁл¯ ÕûÀíÎĵµ
XMLÐòÁл¯Óë·´ÐòÁл¯
    // OBJECT -> XML
    public static void SaveXml(string filePath, object obj) { SaveXml(filePath, obj, obj.GetType()); }
    public static void SaveXml(string filePath, object obj, System.Type type)
    {
        using (System.IO.StreamWriter writer = new System.IO.StreamWriter(filePath))
        {
            System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(type);
            xs.Serialize(writer, obj);
            writer.Close();
        }
    }
    // XML -> OBJECT
    public static object LoadXml(string filePath, System.Type type)
    {
        if (!System.IO.File.Exists(filePath))
            return null;
        using (System.IO.StreamReader reader = new System.IO.StreamReader(filePath))
        {
            System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(type);
            object obj = xs.Deserialize(reader);
            reader.Close();
            return obj;
        }
    }
Ïà¹ØµÄ³£ÓÃAttribute£¨ÃüÃû¿Õ¼äSystem.Xml.Serialization £©
    [XmlRootAttribute("PurchaseOrder", Namespace=


Ïà¹ØÎĵµ£º

XMLÈ¡½ÚµãÃû³ÆÓë½ÚµãֵʵÀý

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< ......

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;
panos ......

GridView ²Ù×÷XMLÎļþ

<?xml version="1.0" standalone="yes"?>
<imgs>
<pic name="/adv_pic/1.jpg" url="http://www.baidu.com/" title="test" />
<pic name="/adv_pic/2.jpg" url="http://www.baidu.com/" title="test" />
......

Jasperreportµ¼³öHtml¡¢Pdf¡¢Excel¡¢Rtf¡¢Xml´íÎó»ã×Ü


ת×Ô£ºhttp://lbccheng.blog.163.com/blog/static/314120920095525627390/
ÎÊÌâÒ»£ºÊ¹ÓÃJasperReportÉú³ÉHtml±¨±íºó£¬Êý¾ÝÏÔʾÕýÈ·£¬µ«¸÷ÖÖÏßÌõÏÔʾ²»³öÀ´
           ²úÉúÔ­Òò£ºÔÚ Éú³ÉHTMLÒ³ÃæÊ±JRHtmlExporterParameter.IMAGES_URI²ÎÊýÉèÖò»ÕýÈ·£¬Ö÷ÒªÊÇͼƬµÄ ......

XML¶ÁдÀ࣬CMarkup

//******************** Í·Îļþ  Markup.h  *******************
// Markup.h: interface for the CMarkup class.
//
// Markup Release 11.2
// Copyright (C) 2009 First Objective Software, Inc. All rights reserved
// Go to www.firstobject.com for the latest CMarkup and EDOM documentation
// ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ