111,129
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0" encoding="UTF-8"?>
<SCL xmlns="http://www.iec.ch/61850/2003/SCL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance ./xsd/SCL.xsd" xsi:schemaLocation="http://www.iec.ch/61850/2003/SCL .\xsd\SCL.xsd" xmlns:ext="http://nari-relays.com">
<Header id="template" version="R6" revision="reversion" toolID="toolID" nameStructure="IEDName">
<History>
<Hitem version="1.0" revision="0.1" when="2010/10/13 19:35:28" why="update the file"></Hitem>
<Hitem version="1.0" revision="0.2" when="2010/10/14 09:00:07" why="update the file"></Hitem>
<Hitem version="1.0" revision="0.3" when="2010/10/14 13:28:49" why="update the file"></Hitem>
</History>
</Header>
<?xml version="1.0" encoding="UTF-8"?>
<SCL xmlns="http://www.iec.ch/61850/2003/SCL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance ./xsd/SCL.xsd" xsi:schemaLocation="http://www.iec.ch/61850/2003/SCL .\xsd\SCL.xsd" xmlns:ext="http://nari-relays.com">
<Header id="template" version="R6" revision="reversion" toolID="toolID" nameStructure="IEDName">
<History>
<Hitem version="1.0" revision="0.1" when="2010/10/13 19:35:28" why="update the file"></Hitem>
<Hitem version="1.0" revision="0.2" when="2010/10/14 09:00:07" why="update the file"></Hitem>
<Hitem version="1.0" revision="0.3" when="2010/10/14 13:28:49" why="update the file"></Hitem>
</History>
</Header>
string strXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<WebServiceSync xmlns=\"http://www.ctzj.com/websrvc/xmlBean\">" +
//"<WebServiceSync>" +
"<WebGISSync>" +
"<WebGISSyncRequest>" +
"<IntegrationID>资产Id</IntegrationID>" +
"<RelaIntegrationID>关联关系(关联资产Id)</RelaIntegrationID>" +
"<OrderHeaderId>订单头Id</OrderHeaderId>" +
"<CRMItemID>行项目Id</CRMItemID>" +
"<ProdCode>产品类别</ProdCode>" +
"<RelationCode>动作</RelationCode>" +
"<MethodName>方法名</MethodName>" +
"<ActionType>子行为</ActionType>" +
"<PreNumber>老号码</PreNumber>" +
"<StdAddrId>最终地址ID</StdAddrId>" +
"<ActionCode>动作类型</ActionCode>" +
"<AreaCode>营业区</AreaCode>" +
"</WebGISSyncRequest>" +
"</WebGISSync>" +
"</WebServiceSync>";
string ss = "xmlns=\"http://www.ctzj.com/websrvc/xmlBean\"";
strXml = strXml.Replace(ss,"");
if (strXml != "")
{
XmlDocument XmlDoc = new XmlDocument();
XmlDoc.LoadXml(strXml);
XmlNode root = XmlDoc.DocumentElement;
string RelaIntegrationID = root.SelectSingleNode("/WebServiceSync/WebGISSync/WebGISSyncRequest/RelaIntegrationID").InnerText;
}
<?xml version="1.0" encoding="UTF-8"?>
<SCL xmlns="http://www.iec.ch/61850/2003/SCL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance ./xsd/SCL.xsd" xsi:schemaLocation="http://www.iec.ch/61850/2003/SCL .\xsd\SCL.xsd" xmlns:ext="http://nari-relays.com">
<Header id="template" version="R6" revision="reversion" toolID="toolID" nameStructure="IEDName">
<History>
<Hitem version="1.0" revision="0.1" when="2010/10/13 19:35:28" why="update the file"></Hitem>
<Hitem version="1.0" revision="0.2" when="2010/10/14 09:00:07" why="update the file"></Hitem>
<Hitem version="1.0" revision="0.3" when="2010/10/14 13:28:49" why="update the file"></Hitem>
</History>
</Header>
<IED>....</IED>
<?xml version="1.0" encoding="UTF-8"?>
<SCL>
<Header id="template" version="R6" revision="reversion" toolID="toolID" nameStructure="IEDName">
<History>
<Hitem version="1.0" revision="0.1" when="2010/10/13 19:35:28" why="update the file"></Hitem>
<Hitem version="1.0" revision="0.2" when="2010/10/14 09:00:07" why="update the file"></Hitem>
<Hitem version="1.0" revision="0.3" when="2010/10/14 13:28:49" why="update the file"></Hitem>
</History>
</Header>
<IED>....</IED>
OXmlDoct.Load(cidpath.Text);
NoList = OXmlDoct.DocumentElement.SelectNodes("IED");
<?xml version="1.0" encoding="UTF-8"?>
<SCL xmlns="http://www.iec.ch/61850/2003/SCL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance ./xsd/SCL.xsd" xsi:schemaLocation="http://www.iec.ch/61850/2003/SCL .\xsd\SCL.xsd" xmlns:ext="http://nari-relays.com">
<Header id="template" version="R6" revision="reversion" toolID="toolID" nameStructure="IEDName">
<History>
<Hitem version="1.0" revision="0.1" when="2010/10/13 19:35:28" why="update the file"></Hitem>
<Hitem version="1.0" revision="0.2" when="2010/10/14 09:00:07" why="update the file"></Hitem>
<Hitem version="1.0" revision="0.3" when="2010/10/14 13:28:49" why="update the file"></Hitem>
</History>
</Header>
</SCL>XmlDocument xd = new XmlDocument();
xd.Load(@"D:\aaaaa.xml");
int hC = xd.GetElementsByTagName("Hitem").Count;
MessageBox.Show(hC.ToString());//3