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

XML ÎļþÓüÇʱ¾´ò¿ª»»ÐÐÓë²»»»ÐÐÎÊÌâ

C# code:
public void WriteISFXml(string RefNo,string TransType,string ShipmentType)
{
///³õʼ»¯XMLÀàµÈ²Ù×÷
XmlDocument xmlDoc = new XmlDocument();
///¼ÓÔØ±¾µØXMLÎļþ
xmlDoc.Load(sPath);
XmlNode root = xmlDoc.SelectSingleNode("ISF");

XmlElement SendersUniqueRefer = xmlDoc.CreateElement("SendersUniqueReference");
SendersUniqueRefer.InnerText = RefNo;
root.AppendChild(SendersUniqueRefer);
XmlElement SubType = xmlDoc.CreateElement("SubmissionType");
SubType.InnerText = TransType;
root.AppendChild(SubType);
XmlElement ShprTypeCode = xmlDoc.CreateElement("ShipmentTypeCode");
ShprTypeCode.InnerText = ShipmentType;
root.AppendChild(ShprTypeCode);

///±£´æXMLÎļþµ½Ö¸¶¨Îļþ¼Ð,²¢ÒÔÌØ¶¨µÄÃû×ÖÃüÃû
xmlDoc.Save("D:\\In\\hls201004091024172300001.xml");
}

Éú³É³ö來µÄhls201004091024172300001.xmlÎļþÓüÇʱ¾´ò¿ª¿´Ê±,µ±½ÚµãShipmentTypeCodeֵΪ¿Õʱ,
<ShipmentTypeCode>
</ShipmentTypeCode>(»»ÐÐÁË)
¶øÎÒÏÖÔÚÏëÒªµ±ÆäֵΪ¿ÕʱºòΪ<ShipmentTypeCode></ShipmentTypeCode>(²»»»ÐÐ)
請¸÷λָ½Ì,ÓеÄ說¿ÉÒÔÓà XmlReaderSettings ,µ«ÊDz»ÖªµÀÔÚÄÄÀïÉèÖÃ,請´ó¼Ò°ïÖ


Ïà¹ØÎÊ´ð£º

ÔÚÕâÑùÒ»¸öxmlÎļþÀïÈçºÎÑ¡ÔñÌØµã½Úµã

<?xml version="1.0" encoding="UTF-8" ?> 
<root> 
<video> 
  <device deviceid="\\?\usb#vid_0c45&pid_613b#5&2d0620de& ......

java xmlÎÄÌâ - Java / Java SE

<?xml version="1.0" encoding="utf-8" ?> 
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical&q ......

JQUERY Êä³öXML Ôõôд - .NET¼¼Êõ / C#

ÎÒÏÖÔÚÓÐÒ»¸öXML¶ÔÏó
var merxml 
merxml ±£´æµÄÄÚÈÝ ÊÇ
<root>
<a>a</a>
<b>b</b>
</root>
ÎÒÏÖÔÚµÄÄ¿µÄÊÇÒª°Ñ merxml Õâ¸öXML¶ÔÏó ÍêÕûµÄÊä³öµ½Ò»¸öÎı¾¿ò tx ......

sql ²éѯXML - MS-SQL Server / ÒÉÄÑÎÊÌâ

ÓÐÒ»¸öXML
XML code:

<Person>
<Node>
<Name>admin</Name>
<Date>2010-4-6</Date>
</Node>
<Node>
<Name>lisi</Name>
......

XmlDocumentÈçºÎÉú³É±ÕºÏ±ê¼ÇµÄXML - .NET¼¼Êõ / C#

ÎÒÓÃXmlDocumentÉú³ÉXML
XmlElement remarkNode = node.OwnerDocument.CreateElement("remark");
remark1Node.InnerXml = "";
Èç¹ûInnerXml¸³Öµ²»Îª¿Õ£¬ÔòÉú³ÉµÄ±ê¼ÇÊÇûÎÊÌâµÄ£¬±ÈÈ磺<r ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ