Skip XML Element - CSharp System.Xml

CSharp examples for System.Xml:XML Element

Description

Skip XML Element

Demo Code

//   Licensed under the Apache License, Version 2.0 (the "License");
using System.Xml;

public class Main{
        /// <summary>
        /// //from  w  w w  .j a  v a2  s .co  m
        /// </summary>
        /// <param name="reader"></param>
        internal static void SkipElement(XmlReader reader)
        {
            if (reader.IsEmptyElement)
            {
                reader.Read();
            }
            else
            {
                reader.Skip();
            }
        }
}

Related Tutorials