当前位置: 首页>>代码示例>>C#>>正文


C# XmlElement.ToString方法代码示例

本文整理汇总了C#中System.Xml.XmlElement.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# XmlElement.ToString方法的具体用法?C# XmlElement.ToString怎么用?C# XmlElement.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.XmlElement的用法示例。


在下文中一共展示了XmlElement.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetAttributeWithInheritanceOrFail

 public static string GetAttributeWithInheritanceOrFail(XmlElement e, string name)
 {
     string v = GetAttributeWithInheritance(e, name);
     if (null == v)
     {
         throw new ParserException(e.ToString() + " missing \"" + name
             + "\" attribute");
     }
     return v;
 }
开发者ID:apache,项目名称:lucenenet,代码行数:10,代码来源:DOMUtils.cs

示例2: GetFirstChildOrFail

 public static XmlElement GetFirstChildOrFail(XmlElement e)
 {
     XmlElement kid = GetFirstChildElement(e);
     if (null == kid)
     {
         throw new ParserException(e.ToString()
             + " does not contain a child element");
     }
     return kid;
 }
开发者ID:apache,项目名称:lucenenet,代码行数:10,代码来源:DOMUtils.cs

示例3: GetChildByTagOrFail

 public static XmlElement GetChildByTagOrFail(XmlElement e, string name)
 {
     XmlElement kid = GetChildByTagName(e, name);
     if (null == kid)
     {
         throw new ParserException(e.ToString() + " missing \"" + name
             + "\" child element");
     }
     return kid;
 }
开发者ID:apache,项目名称:lucenenet,代码行数:10,代码来源:DOMUtils.cs

示例4: GetNonBlankTextOrFail

 public static string GetNonBlankTextOrFail(XmlElement e)
 {
     string v = GetText(e);
     if (null != v)
         v = v.Trim();
     if (null == v || 0 == v.Length)
     {
         throw new ParserException(e.ToString() + " has no text");
     }
     return v;
 }
开发者ID:apache,项目名称:lucenenet,代码行数:11,代码来源:DOMUtils.cs

示例5: LoadAssembly

 private void LoadAssembly(XmlElement el, string currentDirectory)
 {
     if (el.Name == "Assembly" && el.HasAttribute("Path"))
     {
         string path = el.GetAttribute("Path");
         FileInfo fInfo = new FileInfo(Path.Combine(currentDirectory, path));
         if (!fInfo.Exists)
             fInfo = new FileInfo(path);
         if (fInfo.Exists)
         {
             try
             {
                 Assembly loadedAssembly = Assembly.LoadFrom(fInfo.FullName);
                 bool wasBehaviorAssembly = false;
                 foreach (Type type in loadedAssembly.DefinedTypes)
                 {
                     if (type.BaseType != null && type.BaseType.FullName == "Hansoft.Jean.Behavior.AbstractBehavior")
                     {
                         behaviorTypes.Add(type);
                         wasBehaviorAssembly = true;
                     }
                 }
                 if (!wasBehaviorAssembly)
                 {
                     extensionAssemblies.Add(path);
                 }
             }
             catch (Exception e)
             {
                 logger.Exception("Error in configuration file JeanSettings.xml when loading assembly " + fInfo.FullName + ".", e);
             }
         }
         else
             logger.Error("Error in configuration file JeanSettings.xml. Could not find assembly file: " + path);
     }
     else
         logger.Error("Error in configuration file JeanSettings.xml. Malformed configuration of assemblies: " + el.ToString());
 }
开发者ID:Hansoft,项目名称:Hansoft-Jean-Jean,代码行数:38,代码来源:JeanService.cs

示例6: XmlResult

 public XmlResult(XmlElement xmlElement)
 {
     Content = xmlElement.ToString();
     ContentEncoding = Encoding.UTF8;
     ContentType = "text/xml";
 }
开发者ID:GusLab,项目名称:video-portal,代码行数:6,代码来源:XmlResult.cs

示例7: Write

 protected void Write(XmlElement data)
 {
   ProtocolLog.WriteIf(XmppLog, "Outgoing: " + data.ToString());
   lock(_write_lock) {
     _jc.Write(data);
   }
 }
开发者ID:hseom,项目名称:brunet,代码行数:7,代码来源:XmppService.cs

示例8: HandleAuthError

 /// <summary>Crap, we were denied access, all we can do is notify the user.
 /// Maybe they can change the user parameters and restart the process.</summary>
 protected void HandleAuthError(object sender, XmlElement rp)
 {
   ProtocolLog.WriteIf(ProtocolLog.Exceptions, rp.ToString());
 }
开发者ID:hseom,项目名称:brunet,代码行数:6,代码来源:XmppService.cs


注:本文中的System.Xml.XmlElement.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。