XmlParserContext 클래스

정의

XML 조각을 구문 분석하는 데 필요한 XmlReader 모든 컨텍스트 정보를 제공합니다.

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)

생성자

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

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

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

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

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

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

XmlParserContext(XmlNameTable, XmlNamespaceManager, String, XmlSpace)

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

속성

Name Description
BaseURI

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

DocTypeName

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

Encoding

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

InternalSubset

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

NamespaceManager

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

NameTable

문자열을 XmlNameTable 원자화하는 데 사용되는 값을 가져옵니다. 원자화된 문자열에 대한 자세한 내용은 다음을 참조하세요 XmlNameTable.

PublicId

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

SystemId

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

XmlLang

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

XmlSpace

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

메서드

Name Description
Equals(Object)

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

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

기본 해시 함수로 사용됩니다.

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

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

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

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

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

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

(다음에서 상속됨 Object)

적용 대상