C# 클래스 Mvp.Xml.Common.XPath.XPathDocumentWriter

XmlWriter that can produce an XPathDocument without the need to parse XML.
Using this writer whenever you need to perform fast chained transformations. Using this class avoids reparsing of the intermediate output, yielding lower memory and CPU usage.

Future versions of XPathDocument may offer this functionality out of the box.

Important: this class requires unrestricted member access reflection permissions in order to run. If the Mvp.Xml assembly is installed in the GAC, it will run without problems. The Mvp.Xml allows partially trusted callers, so only this assembly needs to be GAC'ed.

Alternatively, you can configure .NET security policy to allow the appropriate permission (see ReflectionPermission, PermissionState.Unrestricted and ReflectionPermissionFlag.MemberAccess).

상속: System.Xml.XmlWrappingWriter
파일 보기 프로젝트 열기: Monobjc/monobjc-tools 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : XPathDocument

Closes the writer and retrieves the created XPathDocument.

WriteStartElement ( string prefix, string localName, string ns ) : void

See XmlWriter.WriteStartElement(string, string, string).

XPathDocumentWriter ( string baseUri ) : System

Initializes a new instance of XPathDocumentWriter using the given baseUri.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Never disposes the underlying writer as it's not keeping in-memory state.

This override also avoids an exception that is thrown otherwise by the base System.Xml.XmlRawWriter being used internally.

비공개 메소드들

메소드 설명
CreateDocument ( ) : XPathDocument
GetWriter ( XPathDocument document, string baseUri ) : XmlWriter
XPathDocumentWriter ( ) : System

메소드 상세

Close() 공개 메소드

Closes the writer and retrieves the created XPathDocument.
public Close ( ) : XPathDocument
리턴 System.Xml.XPath.XPathDocument

Dispose() 보호된 메소드

Never disposes the underlying writer as it's not keeping in-memory state.
This override also avoids an exception that is thrown otherwise by the base System.Xml.XmlRawWriter being used internally.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

WriteStartElement() 공개 메소드

See XmlWriter.WriteStartElement(string, string, string).
public WriteStartElement ( string prefix, string localName, string ns ) : void
prefix string
localName string
ns string
리턴 void

XPathDocumentWriter() 공개 메소드

Initializes a new instance of XPathDocumentWriter using the given baseUri.
public XPathDocumentWriter ( string baseUri ) : System
baseUri string Base URI to used to construct the .
리턴 System