C# 클래스 com.ximpleware.VTDGen

VTD Generator implementation. Current support built-in entities only It parses DTD, but doesn't resolve declared entities
파일 보기 프로젝트 열기: jzhang2004/vtd-xml 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
e com.ximpleware.EOFException

보호된 프로퍼티들

프로퍼티 타입 설명
LcDepth short
VTDBuffer com.ximpleware.FastLongBuffer
VTDDepth int
XMLDoc byte[]
_l3Buffer com.ximpleware.FastLongBuffer
_l4Buffer com.ximpleware.FastLongBuffer
_l5Buffer com.ximpleware.FastIntBuffer
br bool
currentElementRecord long
default_ns bool
depth int
docLen int
docOffset int
encoding int
endOffset int
helper bool
isXML bool
l1Buffer com.ximpleware.FastLongBuffer
l2Buffer com.ximpleware.FastLongBuffer
l3Buffer com.ximpleware.FastIntBuffer
ns bool
nsBuffer1 com.ximpleware.FastIntBuffer
nsBuffer2 com.ximpleware.FastLongBuffer
nsBuffer3 com.ximpleware.FastLongBuffer
offset int
prev_offset int
r IReader
rootIndex int
shallowDepth bool
singleByteEncoding bool
tag_stack long[]

Private Properties

프로퍼티 타입 설명
_getCharResolved long
_writeVTD void
addWhiteSpaceRecord void
checkAttributeUniqueness void
checkPrefix bool
checkPrefix2 bool
checkQualifiedAttributeUniqueness void
decide_encoding void
disallow_xmlns void
entityIdentifier int
finishUp void
formatLineNumber String
formatLineNumber String
getCharUnit int
handleOtherTextChar void
handleOtherTextChar2 void
identifyNsURL int
matchCPEncoding void
matchISOEncoding void
matchURL bool
matchUTFEncoding void
matchWindowsEncoding void
matchXML bool
processElementTail int
process_attr_name void
process_attr_val int
process_cdata int
process_comment int
process_dec_attr int
process_doc_type int
process_end_comment int
process_end_doc int
process_end_pi int
process_ex_seen int
process_pi_tag int
process_pi_val int
process_qm_seen int
process_start_doc int
qualifyAttributes void
qualifyElement void
writeVTD void
writeVTDText void
writeVTD_L5 void

공개 메소드들

메소드 설명
VTDGen ( ) : System

VTDGen constructor method.

clear ( ) : void

Clear internal states so VTDGEn can process the next file.

enableIgnoredWhiteSpace ( bool b ) : void

Enable the parser to collect all white spaces, including the ignored white spaces By default, ignore white spaces are ignored

getIndexSize ( ) : long

Precompute the size of VTD+XML index without actully generating it

getNav ( ) : VTDNav

The entity aware version of getCharAfterS

This method returns the VTDNav object after parsing, it also cleans internal state so VTDGen can process the next file.

loadIndex ( System is_Renamed ) : VTDNav

This method loads the VTD+XML from an input stream

loadIndex ( byte ba ) : VTDNav

This method loads the VTD+XML from a byte array, assuming the first 32 bytes are not XML bytes (but instead header of the VTD+XML index)

loadSeparateIndex ( String XMLFileName, String VTDFileName ) : VTDNav
parse ( bool NS ) : void

Generating VTD tokens and Location cache info. VTDGen conforms to XML namespace 1.0 spec

parseFile ( String fileName, bool ns ) : bool

parse a file directly

parseHttpUrl ( String url, bool ns ) : bool

This method grabs an XML doc from the net using HTTP get

selectLcDepth ( int i ) : void

setDoc ( byte ba ) : void

Set the XMLDoc container.

setDoc ( byte ba, int os, int len ) : void

Set the XMLDoc container. Also set the offset and len of the document with respect to the container.

setDoc_BR ( byte ba ) : void

The buffer-reuse version of setDoc The concept is to reuse LC and VTD buffer for XML parsing, instead of allocating every time

setDoc_BR ( byte ba, int os, int len ) : void

The buffer-reuse version of setDoc The concept is to reuse LC and VTD buffer for XML parsing, instead of allocating every time

writeIndex ( System os ) : void

This method writes the VTD+XML into an output streams

writeSeparateIndex ( String fileName ) : void
writeSeparateIndex ( System os ) : void

비공개 메소드들

메소드 설명
_getCharResolved ( int byte_offset ) : long
_writeVTD ( int offset, int length, int token_type, int depth ) : void
addWhiteSpaceRecord ( ) : void

checkAttributeUniqueness ( ) : void
checkPrefix ( int os, int len ) : bool
checkPrefix2 ( int os, int len ) : bool
checkQualifiedAttributeUniqueness ( ) : void
decide_encoding ( ) : void

A private method that detects the BOM and decides document encoding

disallow_xmlns ( int byte_offset ) : void
entityIdentifier ( ) : int

This method will detect whether the entity is valid or not and increment offset.

finishUp ( ) : void

Write the remaining portion of LC info

formatLineNumber ( ) : String

Format the string indicating the position (line number:offset)of the offset if there is an exception.

formatLineNumber ( int os ) : String
getCharUnit ( int byte_offset ) : int
handleOtherTextChar ( int ch ) : void
handleOtherTextChar2 ( int ch ) : void
identifyNsURL ( int byte_offset, int length ) : int
matchCPEncoding ( ) : void
matchISOEncoding ( ) : void
matchURL ( int bos1, int len1, int bos2, int len2 ) : bool
matchUTFEncoding ( ) : void
matchWindowsEncoding ( ) : void
matchXML ( int byte_offset ) : bool
processElementTail ( bool helper ) : int
process_attr_name ( ) : void
process_attr_val ( ) : int
process_cdata ( ) : int

This private method processes CDATA section

process_comment ( ) : int

This private method process comment

process_dec_attr ( ) : int

This private method processes declaration attributes

process_doc_type ( ) : int

This private method process DTD

process_end_comment ( ) : int

This private method process the comment after the root document

process_end_doc ( ) : int
process_end_pi ( ) : int

This private method processes PI after root document

process_ex_seen ( ) : int
process_pi_tag ( ) : int

This private method processes PI tag

process_pi_val ( ) : int

This private method processes PI val

process_qm_seen ( ) : int
process_start_doc ( ) : int
qualifyAttributes ( ) : void
qualifyElement ( ) : void
writeVTD ( int offset, int length, int token_type, int depth ) : void

Write the VTD and LC into their storage container.

writeVTDText ( int offset, int length, int token_type, int depth ) : void
writeVTD_L5 ( int offset, int length, int token_type, int depth ) : void

메소드 상세

VTDGen() 공개 메소드

VTDGen constructor method.
public VTDGen ( ) : System
리턴 System

clear() 공개 메소드

Clear internal states so VTDGEn can process the next file.
public clear ( ) : void
리턴 void

enableIgnoredWhiteSpace() 공개 메소드

Enable the parser to collect all white spaces, including the ignored white spaces By default, ignore white spaces are ignored
public enableIgnoredWhiteSpace ( bool b ) : void
b bool
리턴 void

getIndexSize() 공개 메소드

Precompute the size of VTD+XML index without actully generating it
public getIndexSize ( ) : long
리턴 long

getNav() 공개 메소드

The entity aware version of getCharAfterS This method returns the VTDNav object after parsing, it also cleans internal state so VTDGen can process the next file.
public getNav ( ) : VTDNav
리턴 VTDNav

loadIndex() 공개 메소드

This method loads the VTD+XML from an input stream
public loadIndex ( System is_Renamed ) : VTDNav
is_Renamed System
리턴 VTDNav

loadIndex() 공개 메소드

This method loads the VTD+XML from a byte array, assuming the first 32 bytes are not XML bytes (but instead header of the VTD+XML index)
public loadIndex ( byte ba ) : VTDNav
ba byte
리턴 VTDNav

loadSeparateIndex() 공개 메소드

public loadSeparateIndex ( String XMLFileName, String VTDFileName ) : VTDNav
XMLFileName String
VTDFileName String
리턴 VTDNav

parse() 공개 메소드

Generating VTD tokens and Location cache info. VTDGen conforms to XML namespace 1.0 spec
public parse ( bool NS ) : void
NS bool boolean Enable namespace or not ///
리턴 void

parseFile() 공개 메소드

parse a file directly
public parseFile ( String fileName, bool ns ) : bool
fileName String Name of the file to be parsed
ns bool namespace awareness
리턴 bool

parseHttpUrl() 공개 메소드

This method grabs an XML doc from the net using HTTP get
public parseHttpUrl ( String url, bool ns ) : bool
url String
ns bool namespace aware or not
리턴 bool

selectLcDepth() 공개 메소드

public selectLcDepth ( int i ) : void
i int
리턴 void

setDoc() 공개 메소드

Set the XMLDoc container.
public setDoc ( byte ba ) : void
ba byte byte[] ///
리턴 void

setDoc() 공개 메소드

Set the XMLDoc container. Also set the offset and len of the document with respect to the container.
public setDoc ( byte ba, int os, int len ) : void
ba byte byte[] ///
os int int (in byte) ///
len int int (in byte) ///
리턴 void

setDoc_BR() 공개 메소드

The buffer-reuse version of setDoc The concept is to reuse LC and VTD buffer for XML parsing, instead of allocating every time
public setDoc_BR ( byte ba ) : void
ba byte * ///
리턴 void

setDoc_BR() 공개 메소드

The buffer-reuse version of setDoc The concept is to reuse LC and VTD buffer for XML parsing, instead of allocating every time
public setDoc_BR ( byte ba, int os, int len ) : void
ba byte byte[] ///
os int int (in byte) ///
len int int (in byte) /// ///
리턴 void

writeIndex() 공개 메소드

This method writes the VTD+XML into an output streams
public writeIndex ( System os ) : void
os System ///
리턴 void

writeSeparateIndex() 공개 메소드

public writeSeparateIndex ( String fileName ) : void
fileName String
리턴 void

writeSeparateIndex() 공개 메소드

public writeSeparateIndex ( System os ) : void
os System
리턴 void

프로퍼티 상세

LcDepth 보호되어 있는 프로퍼티

protected short LcDepth
리턴 short

VTDBuffer 보호되어 있는 프로퍼티

protected FastLongBuffer,com.ximpleware VTDBuffer
리턴 com.ximpleware.FastLongBuffer

VTDDepth 보호되어 있는 프로퍼티

protected int VTDDepth
리턴 int

XMLDoc 보호되어 있는 프로퍼티

protected byte[] XMLDoc
리턴 byte[]

_l3Buffer 보호되어 있는 프로퍼티

protected FastLongBuffer,com.ximpleware _l3Buffer
리턴 com.ximpleware.FastLongBuffer

_l4Buffer 보호되어 있는 프로퍼티

protected FastLongBuffer,com.ximpleware _l4Buffer
리턴 com.ximpleware.FastLongBuffer

_l5Buffer 보호되어 있는 프로퍼티

protected FastIntBuffer,com.ximpleware _l5Buffer
리턴 com.ximpleware.FastIntBuffer

br 보호되어 있는 프로퍼티

protected bool br
리턴 bool

currentElementRecord 보호되어 있는 프로퍼티

protected long currentElementRecord
리턴 long

default_ns 보호되어 있는 프로퍼티

protected bool default_ns
리턴 bool

depth 보호되어 있는 프로퍼티

protected int depth
리턴 int

docLen 보호되어 있는 프로퍼티

protected int docLen
리턴 int

docOffset 보호되어 있는 프로퍼티

protected int docOffset
리턴 int

e 공개적으로 프로퍼티

public EOFException,com.ximpleware e
리턴 com.ximpleware.EOFException

encoding 보호되어 있는 프로퍼티

protected int encoding
리턴 int

endOffset 보호되어 있는 프로퍼티

protected int endOffset
리턴 int

helper 보호되어 있는 프로퍼티

protected bool helper
리턴 bool

isXML 보호되어 있는 프로퍼티

protected bool isXML
리턴 bool

l1Buffer 보호되어 있는 프로퍼티

protected FastLongBuffer,com.ximpleware l1Buffer
리턴 com.ximpleware.FastLongBuffer

l2Buffer 보호되어 있는 프로퍼티

protected FastLongBuffer,com.ximpleware l2Buffer
리턴 com.ximpleware.FastLongBuffer

l3Buffer 보호되어 있는 프로퍼티

protected FastIntBuffer,com.ximpleware l3Buffer
리턴 com.ximpleware.FastIntBuffer

ns 보호되어 있는 프로퍼티

protected bool ns
리턴 bool

nsBuffer1 보호되어 있는 프로퍼티

protected FastIntBuffer,com.ximpleware nsBuffer1
리턴 com.ximpleware.FastIntBuffer

nsBuffer2 보호되어 있는 프로퍼티

protected FastLongBuffer,com.ximpleware nsBuffer2
리턴 com.ximpleware.FastLongBuffer

nsBuffer3 보호되어 있는 프로퍼티

protected FastLongBuffer,com.ximpleware nsBuffer3
리턴 com.ximpleware.FastLongBuffer

offset 보호되어 있는 프로퍼티

protected int offset
리턴 int

prev_offset 보호되어 있는 프로퍼티

protected int prev_offset
리턴 int

r 보호되어 있는 프로퍼티

protected IReader r
리턴 IReader

rootIndex 보호되어 있는 프로퍼티

protected int rootIndex
리턴 int

shallowDepth 보호되어 있는 프로퍼티

protected bool shallowDepth
리턴 bool

singleByteEncoding 보호되어 있는 프로퍼티

protected bool singleByteEncoding
리턴 bool

tag_stack 보호되어 있는 프로퍼티

protected long[] tag_stack
리턴 long[]