C# »ñÈ¡ÎļþÐÅÏ¢²¢µ¼³öExcel£¬Xml±¨±í
using System;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
// Ìí¼ÓÒýÓÃ -> .NET -> Microsoft.Office.Interop.Excel(2003->11.0, 2007->12.0)
namespace WinFormTable
{
public partial class FormTable : Form
{
#region
private DataTable table;
private ChineseLunisolarCalendar lunarCalendar;
#endregion
public FormTable()
{
#region
InitializeComponent();
lunarCalendar = new ChineseLunisolarCalendar(); // ÖйúÒõÀú¡£
table = new DataTable("File");
table.Locale = CultureInfo.InvariantCulture; // ¹Ì¶¨ÇøÓò¡£
DataColumn column = table.Columns.Add("Name", typeof(String));
table.Columns.Add("Length", typeof(Decimal));
table.Columns.Add("CreationTime", typeof(DateTime));
table.Constraints.Add("PK", column, true); // ´´½¨Ö÷¼ü¡£
table.DefaultView.ApplyDefaultSort = true; // ʹÓÃĬÈÏÅÅÐò¡£
GridViewStyle();
&nbs
Ïà¹ØÎĵµ£º
DECLARE @x xml
SET @x='
<root>
<ShopAccount>
<ActivityType>IA - PM Standing WO (for LPI report)</ActivityType>
<ProjectNo>R</ProjectNo>
</ShopAccount>
<ShopAccount>
......
XStreamʹÓÃ
XStreamÊÇÒ»¸öJava¶ÔÏóºÍXMLÏ໥ת»»µÄ¹¤¾ß£¬ºÜºÃºÜÇ¿´ó¡£ÌṩÁËËùÓеĻù´¡ÀàÐÍ¡¢Êý×é¡¢¼¯ºÏµÈÀàÐÍÖ±½Óת»»µÄÖ§³Ö¡£Òò´ËXML³£ÓÃÓÚÊý¾Ý½»»»¡¢¶ÔÏóÐòÁл¯£¨ÕâÖÖÐòÁл¯ºÍJava¶ÔÏóµÄÐòÁл¯¼¼ÊõÓÐ×ű¾ÖʵÄÇø±ð£©¡£
XStreamÖеĺËÐÄÀà¾ÍÊÇXStreamÀ࣬һ°ãÀ´Ëµ£¬ÊìϤÕâ¸öÀà»ù±¾¾Í¹»ÓÃÁË£¬Èç¹ûÄãÓõĸü¶à£¬¹À¼ÆÊÇÄ ......
дXML£º
protected void btnSave_Click(object sender, EventArgs e)
{
//ȨÏÞÅжÏ
XmlTextWriter xmlw = new XmlTextWriter(Server.MapPath("~\\") + "FriendLink.xml", Encoding.Ge ......
µ¼Èëjdom1.1°æ
http://www.jdom.org/dist/binary/
import java.io.FileReader;
import org.jdom.Document;
import org.jdom.input.SAXBuilder;
public class XMLValidate {
public void validate(String xml, String schema) {
try {
SAXBuilder builder = new SAXBuilder(true);
//Ö¸¶¨Ô¼Êø·½ ......
ÔÚËÑË÷ÒýÇæµÄ¿ª·¢ÖУ¬ÎÒÃÇÐèÒª¶ÔÍøÒ³µÄHtmlÄÚÈݽøÐмìË÷£¬ÄÑÃâµÄ¾ÍÐèÒª¶ÔHtml½øÐнâÎö¡£²ð·Öÿһ¸ö½Úµã²¢ÇÒ»ñÈ¡½Úµã¼äµÄÄÚÈÝ¡£´ËÎĽéÉÜÁ½ÖÖC#½âÎöHtmlµÄ·½·¨¡£
µÚÒ»ÖÖ·½·¨£º
ÓÃSystem.Net.WebClientÏÂÔØWeb Page´æµ½±¾µØÎļþ»òÕßStringÖУ¬ÓÃÕýÔò±í´ïʽÀ´·ÖÎö¡£Õâ¸ö·½·¨¿ÉÒÔÓÃÔÚWeb CrawlerµÈÐèÒª·ÖÎöºÜ¶àWeb PageµÄÓ¦ÓÃÖ ......