읽어들일 XML 파일 'booklist.xml' 기초에서 실무까지 XML 신민철 프리렉 35000 사랑과 전쟁 이사랑 전쟁문화사 15000 마이크로 소프트 빌 게이츠 마소문화사 20000 액션가면부인 바람났네 짱구 짱구출판사 12000 Javascript에서 DOM을 이용해본 사람이라면 익숙할 getElementById() 메소드를 이용하는 동일한 사용법으로 이용할 수 있다. ID를 이용해서 테그를 선택해야하는데. 단, HTML DOM은 이미 ID라는 attribute가 정의 되어 있지만 xml에서는 id attribute가 정해져 있는 것이 아니다. 따라서 위 xml파일과 같이 dtd 파일에서 attribute를 ID특성으로 정의 해줘야 한다. 참조하는 DTD 파일은 다음과 같다. 'booklist.d..
읽어들일 XML 파일 'booklist.xml' 기초에서 실무까지 XML 신민철 프리렉 35000 사랑과 전쟁 이사랑 전쟁문화사 15000 마이크로 소프트 빌 게이츠 마소문화사 20000 액션가면부인 바람났네 짱구 짱구출판사 12000 이번 예제는 Javascript 로 dom을 이용한 분들은 친숙할 getElementByTagName() 메소드를 보게되는 예제이다. 마찬가지로 tag 이름을 가지고 엘리먼트를 선택하는 예제이다. using System; using System.Linq; using System.Collections.Generic; using System.Text; using System.Xml; namespace CH11 { class p560_FindElementByTagName { s..
읽어들일 XML 파일 'booklist.xml' 기초에서 실무까지 XML 신민철 프리렉 35000 사랑과 전쟁 이사랑 전쟁문화사 15000 마이크로 소프트 빌 게이츠 마소문화사 20000 액션가면부인 바람났네 짱구 짱구출판사 12000 이번 예제는 XmlAttributeCollection을 이용해 element에 속한 attribute를 collection으로 가져와서 loop를 이용해 출력하는 예제를보여준다. using System; using System.Linq; using System.Collections.Generic; using System.Text; using System.Xml; namespace CH11 { class p559_FindAttribute { static void Main()..
읽어들일 XML 파일 'booklist.xml' 기초에서 실무까지 XML 신민철 프리렉 35000 사랑과 전쟁 이사랑 전쟁문화사 15000 마이크로 소프트 빌 게이츠 마소문화사 20000 액션가면부인 바람났네 짱구 짱구출판사 12000 이번 예제는 NextSibling, PreviousSibling을 이용해서 Element의 앞, 뒤 노드를 탐색하는 예제입니다. using System; using System.Linq; using System.Collections.Generic; using System.Text; using System.Xml; namespace CH11 { class p557 { static void Main() { string filePath = @"..\..\booklist.xml"..
읽어들일 XML 파일 'booklist.xml' 기초에서 실무까지 XML 신민철 프리렉 35000 사랑과 전쟁 이사랑 전쟁문화사 15000 마이크로 소프트 빌 게이츠 마소문화사 20000 액션가면부인 바람났네 짱구 짱구출판사 12000 위 문서를 C#으로 읽어 들이기 위해 XmlDocument 개체를 이용한다. using System; using System.Linq; using System.Collections.Generic; using System.Text; using System.Xml; namespace CH11 { class p556 { static void Main() { string filePath = @"..\..\booklist.xml"; XmlDocument xDoc = new XmlD..
읽어들일 XML 파일 'booklist.xml' 기초에서 실무까지 XML 신민철 프리렉 35000 사랑과 전쟁 이사랑 전쟁문화사 15000 마이크로 소프트 빌 게이츠 마소문화사 20000 액션가면부인 바람났네 짱구 짱구출판사 12000 위 문서를 C#으로 읽어 들이기 위해 XmlDocument 개체를 이용한다. using System; using System.Linq; using System.Collections.Generic; using System.Text; using System.Xml; namespace CH11 { class p554 { static void Main() { string filePath = @"..\..\booklist.xml"; XmlDocument xDoc = new XmlD..