XmlReader.ReadToFollowing 메서드

정의

명명된 요소를 찾을 때까지 읽습니다.

오버로드

Name Description
ReadToFollowing(String)

지정된 정규화된 이름을 가진 요소를 찾을 때까지 읽습니다.

ReadToFollowing(String, String)

지정된 로컬 이름 및 네임스페이스 URI를 가진 요소가 발견될 때까지 읽습니다.

ReadToFollowing(String)

Source:
XmlReader.cs
Source:
XmlReader.cs
Source:
XmlReader.cs
Source:
XmlReader.cs
Source:
XmlReader.cs

지정된 정규화된 이름을 가진 요소를 찾을 때까지 읽습니다.

public:
 virtual bool ReadToFollowing(System::String ^ name);
public virtual bool ReadToFollowing(string name);
abstract member ReadToFollowing : string -> bool
override this.ReadToFollowing : string -> bool
Public Overridable Function ReadToFollowing (name As String) As Boolean

매개 변수

name
String

요소의 정규화된 이름입니다.

반품

true 일치하는 요소가 있으면 이고, 그렇지 않으면 falseXmlReader 파일 상태가 종료됩니다.

예외

XmlReader 이전 비동기 작업이 완료되기 전에 메서드가 호출되었습니다. 이 경우 InvalidOperationException "비동기 작업이 이미 진행 중입니다."라는 메시지와 함께 throw됩니다.

매개 변수가 빈 문자열입니다.

설명

이 메서드는 현재 노드에서 XPath 식을 실행하는 것과 following::name 기능적으로 동일합니다. XML 문서에서 명명된 요소를 빠르게 찾을 수 있습니다. 판독기를 지정된 이름과 일치하는 다음 요소로 이동하고 일치하는 요소가 발견되면 반환합니다 true . 아래 예제를 사용하여 판독기는 앞으로 읽는 동안 지정된 요소의 첫 번째 인스턴스를 읽습니다.

<!--"sample.xml"-->
<?xml version="1.0">
   <items>
      <item xmls="urn:1"/>
   </items>
</xml>
XmlTextReader reader = newXmlTextReader("sample.xml");

reader.ReadToFollowing("item");

이 메서드는 모든 노드 형식에서 호출할 수 있습니다.

적용 대상

ReadToFollowing(String, String)

Source:
XmlReader.cs
Source:
XmlReader.cs
Source:
XmlReader.cs
Source:
XmlReader.cs
Source:
XmlReader.cs

지정된 로컬 이름 및 네임스페이스 URI를 가진 요소가 발견될 때까지 읽습니다.

public:
 virtual bool ReadToFollowing(System::String ^ localName, System::String ^ namespaceURI);
public virtual bool ReadToFollowing(string localName, string namespaceURI);
abstract member ReadToFollowing : string * string -> bool
override this.ReadToFollowing : string * string -> bool
Public Overridable Function ReadToFollowing (localName As String, namespaceURI As String) As Boolean

매개 변수

localName
String

요소의 로컬 이름입니다.

namespaceURI
String

요소의 네임스페이스 URI입니다.

반품

true 일치하는 요소가 있으면 이고, 그렇지 않으면 falseXmlReader 파일 상태가 종료됩니다.

예외

XmlReader 이전 비동기 작업이 완료되기 전에 메서드가 호출되었습니다. 이 경우 InvalidOperationException "비동기 작업이 이미 진행 중입니다."라는 메시지와 함께 throw됩니다.

두 매개 변수 값은 모두 .입니다 null.

설명

이 메서드는 현재 노드에서 XPath 식을 실행하는 것과 following::name 기능적으로 동일합니다. XML 문서에서 명명된 요소를 빠르게 찾을 수 있습니다. 판독기를 지정된 이름과 일치하는 다음 요소로 이동하고 일치하는 요소가 발견되면 반환합니다 true .

<!--"sample.xml"-->
<?xml version="1.0">
   <items>
      <item xmls="urn:1"/>
   </items>
</xml>
XmlTextReader reader = newXmlTextReader("sample.xml");

reader.ReadToFollowing("item", "urn:1");

이 메서드는 모든 노드 형식에서 호출할 수 있습니다.

적용 대상