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=
Ïà¹ØÎĵµ£º
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< ......
<!--
/* 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 ......
<?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" />
......
ת×Ô£ºhttp://lbccheng.blog.163.com/blog/static/314120920095525627390/
ÎÊÌâÒ»£ºÊ¹ÓÃJasperReportÉú³ÉHtml±¨±íºó£¬Êý¾ÝÏÔʾÕýÈ·£¬µ«¸÷ÖÖÏßÌõÏÔʾ²»³öÀ´
²úÉúÔÒò£ºÔÚ Éú³ÉHTMLÒ³ÃæÊ±JRHtmlExporterParameter.IMAGES_URI²ÎÊýÉèÖò»ÕýÈ·£¬Ö÷ÒªÊÇͼƬµÄ ......
//******************** Í·Îļþ 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
// ......