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

XMLɾ³ý맪ÓÐÌõ¼þµÄ×Ó½Úµã

<power_line>
<name>¼Î»ª305Ïß </name>
<sap_id>5020-S-0000-0065 </sap_id>
        <dydj>35kV </dydj>
<poles>
<pole>
<name>¼Î»ª305ÏßµçÀµçÀÂ#0 </name>
<xh>0 </xh>
<sap_id>000000000040719166 </sap_id>
</pole>
<pole>
<name>¼Î»ª305ÏßµçÀÂÖ§¼Ü </name>
<xh>0 </xh>
<sap_id>000000000040627384 </sap_id>
<jd>120.7071280158 </jd>
<wd>30.6240158394 </wd>
</pole>
<pole>
<name>¼Î»ª305ÏßµçÀµçÀÂ#1 </name>
<xh>1 </xh>
<sap_id>000000000040716119 </sap_id>
</pole>
        </poles>
</power_line>


ÎÒÏë°Ñ²»º¬ÓÐ <jd>µÄ×ӽڵ㶼ɾ³ýµô.ÇëÎÊÒªÔõô×ö?

±éÀú pole + ÅÐ¶Ï É¾³ý...


»òÕߣº
C# code:
using System;
using System.Diagnostics;
using System.Xml;

namespace ConsoleApplication9 {
class Program {
static void Main() {
string xml = @"
<power_line>
<name>¼Î»ª305Ïß </name>
<sap_id>50


Ïà¹ØÎÊ´ð£º

vb¶ÁÈ¡ÓÃwordת»»³ÉµÄxmlÀïµÄÊý¾Ý - VB / »ù´¡Àà

Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' ´ò¿ª¸Õ´´½¨µÄÎļþ¡£
ReDim MyString(LOF(1) - 1)
  Put #1, , MyRecord ' ¶ÁÈëËùÓÐ×Ö·ûµ½±äÁ¿ÖÐ ......

Ϊʲôxml²»ÄÜÏÔʾ°¢À­²®ÎÄ - C/C++ / C++ ÓïÑÔ

ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À­²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎĶ¼¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À­²®ÎĵÄ×Ö¿âÄãÓÐô£¿

ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......

VCÖÐxml±éÀú - VC/MFC / ATL/ActiveX/COM

ÈçºÎÓÃATL´°ÌåÓ¦ÓóÌÐòÖÐÓÃSystem.Xml±éÀúÒ»¸öXmlÎļþ
Äã˵µÄÊÇÍйܴúÂ룿
¡£

vc¿ÉÓÃmsxml
http://msdn.microsoft.com/en-us/library/ms767594(VS.85).aspx

MSXML4  
  //ÒýÈëmsxml4.dll &nbs ......

SQL server·Ö½âXML - MS-SQL Server / Ó¦ÓÃʵÀý

ÏÂÃæÊÇXML³õʼÎļþÄÚÈÝ
XML code:
<upd:Update xmlns:lar="http://schemas.microsoft.com/msus/2002/12/LogicalApplicabilityRules" xmlns:cmd="http://schemas.microsoft.com/msus/2002/12/Up ......

¹ØÓÚ¶ÁÈ¡URL·½Ê½ÌṩµÄXMLÎļþ - Web ¿ª·¢ / XML/SOAP

ÈçÌ⣬ÎÒÏëÓÃdom4jÀ´¶ÁÈ¡xmlµÄÎļþ
public Document read(String fileName) throws MalformedURLException, DocumentException {
SAXReader reader = new SAXReader();
Document document = read ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ