C# 클래스 iTextSharp.xmp.impl.XmpMetaParser

This class replaces the ExpatAdapter.cpp and does the XML-parsing and fixes the prefix. After the parsing several normalisations are applied to the XMPTree. @since 01.02.2006
파일 보기 프로젝트 열기: nonorganic/dssnet

공개 메소드들

메소드 설명
Parse ( object input, ParseOptions options ) : XMPMeta

Parses the input source into an XMP metadata object, including de-aliasing and normalisation.

비공개 메소드들

메소드 설명
FindRootNode ( XmlNode root, bool xmpmetaRequired, object result ) : object[]

Find the XML node that is the root of the XMP data tree. Generally this will be an outer node, but it could be anywhere if a general XML document is parsed (e.g. SVG). The XML parser counted all rdf:RDF and pxmp:XMP_Packet nodes, and kept a pointer to the last one. If there is more than one possible root use PickBestRoot to choose among them.

If there is a root node, try to extract the version of the previous XMP toolkit.

Pick the first x:xmpmeta among multiple root candidates. If there aren't any, pick the first bare rdf:RDF if that is allowed. The returned root is the rdf:RDF child if an x:xmpmeta element was chosen. The search is breadth first, so a higher level candiate is chosen over a lower level one that was textually earlier in the serialized XML.

ParseXml ( object input, ParseOptions options ) : XmlDocument

Parses the raw XML metadata packet considering the parsing options. Latin-1/ISO-8859-1 can be accepted when the input is a byte stream (some old toolkits versions such packets). The stream is then wrapped in another stream that converts Latin-1 to UTF-8.

If control characters shall be fixed, a reader is used that fixes the chars to spaces (if the input is a byte stream is has to be read as character stream).

Both options reduce the performance of the parser.

ParseXmlFromBytebuffer ( ByteBuffer buffer, ParseOptions options ) : XmlDocument

Parses XML from a byte buffer, fixing the encoding (Latin-1 to UTF-8) and illegal control character optionally.

ParseXmlFromInputStream ( Stream stream, ParseOptions options ) : XmlDocument

Parses XML from an Stream, fixing the encoding (Latin-1 to UTF-8) and illegal control character optionally.

ParseXmlFromString ( string input, ParseOptions options ) : XmlDocument

Parses XML from a string, fixing the illegal control character optionally.

XmpMetaParser ( ) : System

the DOM Parser Factory, options are set

Hidden constructor, initialises the SAX parser handler.

메소드 상세

Parse() 공개 정적인 메소드

Parses the input source into an XMP metadata object, including de-aliasing and normalisation.
Thrown if parsing or normalisation fails.
public static Parse ( object input, ParseOptions options ) : XMPMeta
input object the input can be an InputStream, a String or /// a byte buffer containing the XMP packet.
options iTextSharp.xmp.options.ParseOptions the parse options
리턴 XMPMeta