37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using System;
|
|
using System.Xml;
|
|
|
|
namespace EAIws_C
|
|
{
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
static class modKMI
|
|
{
|
|
|
|
private static string strService = "KMI";
|
|
|
|
private static string RequestKey = string.Empty;
|
|
private static string AccountID = string.Empty;
|
|
private static string SeesionID = string.Empty;
|
|
public const string SuccessCode = "0";
|
|
|
|
public static void GetXMLHeaderNode(XmlDocument xmlDoc)
|
|
{
|
|
|
|
if (xmlDoc.SelectNodes("request").Item(0).SelectNodes("host").Count != 0)
|
|
{
|
|
AccountID = ((XmlElement)xmlDoc.SelectNodes("request").Item(0).SelectNodes("host").Item(0)).GetAttribute("acct");
|
|
if (string.IsNullOrEmpty(AccountID))
|
|
throw new Exception("GetXMLHeaderNode fail!", new Exception("acct is Empty!"));
|
|
}
|
|
else
|
|
{
|
|
throw new Exception("GetXMLHeaderNode fail!", new Exception("acct is not found!"));
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
} |