Tinkr2/4.2/AphelionCore/AphelionCore/Helpers/XMLReaderEX.cs
/// <summary>
/// Returns an XMLNodeEX by it's name
/// </summary>
/// <param name="name">Name of the node to retrieve</param>
/// <returns>Returns the node or null if not found</returns>
Returns an XMLNodeEX by it's name
Returns an XMLNodeEX by it ' s name
public XMLNodeEX NodeByName(string name)
      {
         name = name.ToLower();
         for (int i = 0; i < _nodes.Length; i++)
         {
            if (_nodes[i].Name.ToLower() == name)
            {
               return _nodes[i];
            }
            if (_nodes[i].Nodes.Length > 0)
            {
               for (int j = 0; j < _nodes[i].Nodes.Length; j++)
               {
                  XMLNodeEX subnode = CheckSubNode(_nodes[i].Nodes[j], name);
                  if (subnode != null)
                  {
                     return subnode;
                  }
               }
            }
         }
         return null;
      }
public XMLNodeEX NodeByName ( string name ) { name = name . ToLower ( ) ; for ( int i = 0 ; i < _nodes . Length ; i ++ ) { if ( _nodes [ i ] . Name . ToLower ( ) == name ) { return _nodes [ i ] ; } if ( _nodes [ i ] . Nodes . Length > 0 ) { for ( int j = 0 ; j < _nodes [ i ] . Nodes . Length ; j ++ ) { XMLNodeEX subnode = CheckSubNode ( _nodes [ i ] . Nodes [ j ] , name ) ; if ( subnode != null ) { return subnode ; } } } } return null ; }
Returns an XMLNodeEX by it's name
Returns an XMLNodeEX by it ' s name
Returns the node or null if not found
Returns the node or null if not found
name
string
Name of the node to retrieve
Name of the node to retrieve