GetXml() публичный Метод

public GetXml ( ) : string
Результат string
Пример #1
0
 string getNodeValue(XmlElement element, string name)
 {
     try
     {
         if (element.GetElementsByTagName(name).Count > 0)
         {
             return element.GetElementsByTagName(name)[0].InnerText;
         }
         return "";
     }
     catch (Exception e)
     {
         Debug.WriteLine("Problem geting value " + name + "element null" + (element == null) + " =" + (element.GetElementsByTagName(name) == null));
         Debug.WriteLine("element " + element.GetXml());
         return e.Message;
     }
 }
Пример #2
0
 string getNodeAttribute(XmlElement element, string node, string attribute)
 {
     try
     {
         if (element.GetElementsByTagName(node).Count > 0)
         {
             if (element.GetElementsByTagName(node)[0].Attributes.GetNamedItem(attribute) != null)
             {
                 return element.GetElementsByTagName(node)[0].Attributes.GetNamedItem(attribute).NodeValue.ToString();
             }
         }
         return "";
     }
     catch (Exception e)
     {
         Debug.WriteLine("Problem geting value " + attribute);
         Debug.WriteLine("element " + element.GetXml());
         return e.Message;
     }
 }