XmlParserContext 클래스

정의

XmlReader에서 XML 조각을 구문 분석할 때 필요한 모든 컨텍스트 정보를 제공합니다.

public ref class XmlParserContext
public class XmlParserContext
type XmlParserContext = class
Public Class XmlParserContext
상속
XmlParserContext

예제

다음 예제에서는 XML 조각을 읽는 개체를 만듭니다 XmlReader .

string xmlFrag ="<item rk:ID='abc-23'>hammer</item> " +
                        "<item rk:ID='r2-435'>paint</item>" +
                        "<item rk:ID='abc-39'>saw</item>";

// Create the XmlNamespaceManager.
NameTable nt = new NameTable();
XmlNamespaceManager nsmgr = new XmlNamespaceManager(nt);
nsmgr.AddNamespace("rk", "urn:store-items");

// Create the XmlParserContext.
XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);

// Create the reader.
XmlReaderSettings settings = new XmlReaderSettings();
settings.ConformanceLevel = ConformanceLevel.Fragment;
XmlReader reader = XmlReader.Create(new StringReader(xmlFrag), settings, context);
Dim xmlFrag As String = "<item rk:ID='abc-23'>hammer</item> " & _
                                     "<item rk:ID='r2-435'>paint</item>" & _
                                     "<item rk:ID='abc-39'>saw</item>"

' Create the XmlNamespaceManager.
Dim nt As New NameTable()
Dim nsmgr As New XmlNamespaceManager(nt)
nsmgr.AddNamespace("rk", "urn:store-items")

' Create the XmlParserContext.
Dim context As New XmlParserContext(Nothing, nsmgr, Nothing, XmlSpace.None)

' Create the reader. 
Dim settings As New XmlReaderSettings()
settings.ConformanceLevel = ConformanceLevel.Fragment
Dim reader As XmlReader = XmlReader.Create(New StringReader(xmlFrag), settings, context)

생성자

XmlParserContext(XmlNameTable, XmlNamespaceManager, String, String, String, String, String, String, XmlSpace)

지정된 XmlNameTable, XmlNamespaceManager, 기본 URI, XmlParserContext, xml:lang 및 문서 형식 값을 사용하여 xml:space 클래스의 새 인스턴스를 초기화합니다.

XmlParserContext(XmlNameTable, XmlNamespaceManager, String, String, String, String, String, String, XmlSpace, Encoding)

지정된 XmlNameTable, XmlNamespaceManager, 기본 URI, XmlParserContext, xml:lang, 인코딩 및 문서 형식 값을 사용하여 xml:space 클래스의 새 인스턴스를 초기화합니다.

XmlParserContext(XmlNameTable, XmlNamespaceManager, String, XmlSpace)

지정된 XmlParserContext, XmlNameTable, XmlNamespaceManagerxml:lang 값을 사용하여 xml:space 클래스의 새 인스턴스를 초기화합니다.

XmlParserContext(XmlNameTable, XmlNamespaceManager, String, XmlSpace, Encoding)

지정된 XmlNameTable, XmlNamespaceManager, XmlParserContext, xml:lang 및 인코딩을 사용하여 xml:space 클래스의 새 인스턴스를 초기화합니다.

속성

BaseURI

기본URI를 가져오거나 설정합니다.

DocTypeName

문서 형식 선언의 이름을 가져오거나 설정합니다.

Encoding

인코딩 형식을 가져오거나 설정합니다.

InternalSubset

내부 DTD 하위 집합을 가져오거나 설정합니다.

NamespaceManager

XmlNamespaceManager를 가져오거나 설정합니다.

NameTable

문자열을 원자화할 때 사용하는 XmlNameTable을 가져옵니다. 원자화된 문자열에 대한 자세한 내용은 XmlNameTable을 참조하십시오.

PublicId

public 식별자를 가져오거나 설정합니다.

SystemId

시스템 식별자를 가져오거나 설정합니다.

XmlLang

현재 xml:lang 범위를 가져오거나 설정합니다.

XmlSpace

현재 xml:space 범위를 가져오거나 설정합니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상