VTD-XML: The Future of XML Processing

SourceForge.net Logo

Sourceforge Home

Mailing Lists

XimpleWare

Download


VTD-XML Home

 

2. LC Entries

This section demonstrates how to derive LCs from VTD records.

Because VTD-XML bases the hierarchy entirely on elements. The VTD record table has been simplified by discarding all VTD records not describing starting tags. Then, the elements to be captured by LCs are highlighted.

Index Token Value Token Type Nesting Depth Offset:Length

Offset: prefix length: Qname length

2 rdf:RDF 0 0 23:3:7
7 channel 0 1 130:0:7
10 title 0 2 188:0:5
12 description 0 2 215:11
14 item 0 1 358:0:4
17 title 0 2 426:0:5
19 description 0 2 477:0:11
21 item 0 1 630:0:4
24 title 0 2 700:0:5
26 link 0 2 739:0:4
28 description 0 2 803:0:11

Next, LC tables for element of depth value 1 and 2 are created respectively. The upper 32 bits are filled with the VTD index of the elements (equivalent starting tags).

LC for elements of depth 1 is:

Index  Global VTD index (upper 32 bits)   LC index of  first child (lower 32 bits)
0 7  
1 14  
2 21  

LC for elements of depth 2 is:

Index  Global VTD index (upper 32 bits)   LC index of  first child (lower 32 bits)
0 10  
1 12  
2 17  
3 19  
4 24  
5 26  
6 28  

None of the element of depth 2 has any child elements, so all lower 32 bits are -1 (0xffffffff).

Index  Global VTD index (upper 32 bits)   LC index of  first child (lower 32 bits)
0 10 -1
1 12 -1
2 17 -1
3 19 -1
4 24 -1
5 26 -1
6 28 -1

Children of elements of depth 1 are contained in LC table above. So the lower 32 bits of LC table (below)  for elements of depth value 1 are filled with index value in LC table (above).

Index  Global VTD index (upper 32 bits)   LC index of  first child (lower 32 bits)
0 7 0
1 14 2
2 21 4

VTD in 30 seconds

VTD+XML Format

User's Guide

Developer's Guide

 0. Objective

 1. VTD Records

 2. LC entries

 3. Other outputs

VTD: A Technical Perspective

Code Samples

FAQ

Getting Involved

Benchmark

API Doc

Demo