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

¸ü¿ìµÄдXMLµÄ·½·¨

ÎÒдµÄµÚÒ»¸ö³ÌÐòÖÐдXMLµÄ´úÂëÖ´ÐÐËÙ¶ÈÓÐЩÎÊÌ⣬¸ÄÁËһϣ¬ÏÖÔÚÓÐËù¸ÄÉÆ¡£
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Data.SqlClient;
using System.Xml;
using System.IO;
using System.Collections;
using System.Threading;
namespace StockUpService
{
public partial class StockUpService : ServiceBase
{
public StockUpService()
{
InitializeComponent();
if (!System.Diagnostics.EventLog.SourceExists("MySource"))
{
System.Diagnostics.EventLog.CreateEventSource(
"MySource", "MyNewLog");
}
eventLog1.Source = "MySource";
eventLog1.Log = "MyNewLog";
}
protected override void OnStart(string[] args)
{
System.Timers.Timer t = new System.Timers.Timer(20000); //ʵÀý»¯TimerÀ࣬ÉèÖüä¸ôʱ¼äΪ20000ºÁÃë|20ÃëÖ´ÐÐÒ»´Î£»
t.Elapsed += new System.Timers.ElapsedEventHandler(runservice); //µ½´ïʱ¼äµÄʱºòÖ´ÐÐʼþ£»
t.AutoReset = true; //ÉèÖÃÊÇÖ´ÐÐÒ»´Î£¨false£©»¹ÊÇÒ»Ö±Ö´ÐÐ(true)£»
t.Enabled = true; //ÊÇ·ñÖ´ÐÐSystem.Timers.Timer.Elapsedʼþ£»
}
public void runservice(object source, System.Timers.ElapsedEventArgs e)
{
string t;
t = System.DateTime.Now.Hour.ToString()+System.DateTime.Now.Minute.ToString();
if (t == "933")
{
readXml();
}
}
public static void readXml()
{
string classId="";
string filialeId;
string startTime;
string endTime;
string companyType;
string xmlChildNodes = "";


Ïà¹ØÎĵµ£º

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

spring ÖмÓÔØxmlÅäÖÃÎļþµÄ·½·¨

 
Ò»£ºSpringÖеļ¸ÖÖÈÝÆ÷¶¼Ö§³ÖʹÓÃxml×°Åäbean£¬°üÀ¨£º
    XmlBeanFactory £¬
    ClassPathXmlApplicationContext £¬
    FileSystemXmlApplicationContext £¬
    XmlWebApplicationContext
¼ÓÔØÕâЩÈÝÆ÷µÄÅäÖÃÎļþµÄxmlÓÐһϼ¸ÖÖ³£¼ûµ ......

ÈçºÎÔÚ XML ÎļþÖÐÈ¡µÃÖ¸¶¨ÊôÐÔµÄÏà¹ØÖµ£¿

Á½ÖÖ·½·¨£º
ÆäÒ»£¬Ê¹Óà SelectNodes µÄ·½·¨£»ÒÔÏÂÀý×ÓΪʹÓô˷½·¨µÄ´¦Àí¡£
Æä¶þ£¬Ê¹Óà XQuery µÄ·½·¨¡£
    ''' <summary>
    ''' ´Ó XML ÎļþÖÐÈ¡µÃ¶ÔÓ¦ID µÄÓïÑÔÖµ
    ''' </summary>
    ''' <param name="textID">ÊäÈëµÄID< ......

xmlÔö£¬É¾£¬¸Ä£¬²é

XMLÊÇÒ»ÏîÈÈÃŵļ¼Êõ¡£ËüÖ®ËùÒÔÄܹ»ÒýÆðÈËÃǵÄÐËȤ£¬Ò»¸öÖ÷ÒªµÄÔ­ÒòÔÚÓÚËüÊ®·ÖµÄ¼òµ¥£¬ÈËÃÇ¿ÉÒÔºÜÈÝÒ×µØÀí½âºÍʹÓÃËü¡£Ã¿Ò»¸ö³ÌÐòÔ±¶¼ÄÜÇáÒ׵ؿ´¶®Ò»¸öXMLÎļþ£¬Àí½âËü°üº¬µÄÄÚÈÝ¡£
.NETÖаüº¬Á˺ܶàÖ§³ÖXMLµÄÀ࣬ÕâЩÀàʹµÃ³ÌÐòԱʹÓÃXML±à³Ì¾ÍÈçͬÀí½âXMLÎļþÒ»Ñù¼òµ¥¡£ÔÚÕâÆªÎÄÕÂÖУ¬ÎÒ½«¸ø³öÕâÑùµÄÒ»¸öÀàµÄʹÓÃʾÀý£¬Õ ......

C#¶ÁдxmlÎļþ

ÒÑÖªÓÐÒ»¸öXMLÎļþ£¨bookstore.xml£©ÈçÏ£º
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
  <book genre="fantasy" ISBN="2-3631-4">
    <title>Oberon's Legacy</title>
    <author>Corets, Eva</author>
  &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ