posted by 네코냥이 2014. 1. 17. 11:32

// XML 유효성 및 자식노드 개수 체크


XmlDocument xml = new XmlDocument();

        try

        {

            xml.LoadXml(CATE_INIT_XML.ToUpper());

            if (

                xml.SelectNodes("/ROOT/DATA").Count > MAX_ITEM_CNT)

            {

                String alertMsg = "자식노드가 지정한 한계보다 많습니다.";

                // Alert(this, alertMsg);

               // return false;

            }

        }

        catch (XmlException xe)

        {

           //Alert(String.Format("XML 파싱오류 {0}-{1}", xe.LineNumber, xe.Message));

           // return false;

        }

        catch (Exception ex)

        {

            //Alert(String.Format("XML 파싱오류 {0}-{1}", "197", ex.Message));

            // return false;

        }

'.NET > C#' 카테고리의 다른 글

DB 프로시저 실행  (0) 2014.02.11
DB 트랜젝션  (0) 2014.02.08
[C#] Anonymous Types in C#  (2) 2014.01.06
[C#] 델리게이트 일부내용  (0) 2014.01.06
[C#] Read only and const variable  (0) 2014.01.06