SimpleFramework.Xml.Stream.NodeReader.IsEmpty C# (CSharp) Méthode

IsEmpty() public méthode

This is used to determine if this input node is empty. An empty node is one with no attributes or children. This can be used to determine if a given node represents an empty entity, with which no extra data can be extracted.
public IsEmpty ( InputNode from ) : bool
from InputNode /// This is the input node to read the value from. ///
Résultat bool
      public bool IsEmpty(InputNode from) {
         if(stack.Top() == from) {
            EventNode node = reader.Peek();

            if(node.IsEnd()) {
               return true;
            }
         }
         return false;
      }

Usage Example

Exemple #1
0
 /// <summary>
 /// This is used to determine if this input node is empty. An
 /// empty node is one with no attributes or children. This can
 /// be used to determine if a given node represents an empty
 /// entity, with which no extra data can be extracted.
 /// </summary>
 /// <returns>
 /// this returns true if the node is an empty element
 /// </returns>
 public bool IsEmpty()
 {
     if (!map.Empty)
     {
         return(false);
     }
     return(reader.IsEmpty(this));
 }