Questions tagged [vtd-xml]

Virtual Token Descriptor for eXtensible Markup Language (VTD-XML) refers to a collection of cross-platform XML processing technologies centered on a non-extractive XML, "document-centric" parsing technique called Virtual Token Descriptor (VTD).

Virtual Token Descriptor for eXtensible Markup Language (VTD-XML) refers to a collection of cross-platform XML processing technologies centered on a non-extractive XML, "document-centric" parsing technique called Virtual Token Descriptor (VTD). Depending on the perspective, VTD-XML can be viewed as one of the following:

  • A "Document-Centric" XML parser
  • A native XML indexer or a file format that uses binary data to enhance the text XML
  • An incremental XML content modifier
  • An XML slicer/splitter/assembler
  • An XML editor/eraser
  • A way to port XML processing on chip
  • A non-blocking, stateless XPath evaluator

VTD-XML is developed by XimpleWare and dual-licensed under GPL and proprietary license. It is originally written in Java, but is now available in C, C++ and C#.

Download vtd-xml at https://vtd-xml.sourceforge.io/

Here are a few articles describing how to code applications in VTD-XML

190 questions
1
vote
1 answer

VTD-XML: how to execute XPath query not from the root element

I need to handle large XML files, and I decided to move from DOM parser to VTD-XML. When I used Java's DOM parser, I could evaluate XPath queries from any node, not from the root. Look at XPath.evaluate prototype: Object evaluate(String expression, …
Dmitry Frank
  • 10,417
  • 10
  • 64
  • 114
1
vote
1 answer

Evaluvate XPath expression from an element in VTD XML

XML File:
kannanrbk
  • 6,964
  • 13
  • 53
  • 94
1
vote
1 answer

VTD-XML XPath is skipping first 3 records

I am using VTD-XML to split a large xml file into smaller xml files. Everything works great accept the: autoPilot.selectXPath("//nodeName") It is skipping over the first 3 nodes for some reason. EDIT: vtd-xml-author pointed out that…
Paul Parker
  • 467
  • 1
  • 8
  • 21
1
vote
1 answer

vtd-xml replaceing whole element

I run into strange problem and I cant find anything on web for that. Im using xpath to locate my xml chunk and then replace it with something else ex: // input ...
kamiseq
  • 593
  • 4
  • 17
1
vote
1 answer

vtd-xml: Autopilot: declareVariableExpr

Java VTD-XML has the following API class AutoPilot{ declareVariableExpr(java.lang.String varName, java.lang.String varExpr); } Register the binding between a variableExpr name and variableExpr expression I have successfully used it for simple…
weima
  • 4,653
  • 6
  • 34
  • 55
1
vote
1 answer

VTD-XML Exception: Name space qualification Exception: prefixed attribute not qualified

I receive an XML via a web service and I am using legacy code (which uses dom4j) to perform some xml transformation. Loading/parsing the original XML into VTD-XML (VTDGen) works fine, no exceptions thrown. However, after loading the xml into…
user1113792
  • 91
  • 1
  • 7
0
votes
1 answer

VTD xml select child nodes

I have the school data in xml file as structured below. SC101-91 Br-111 Residential
technocrat
  • 701
  • 5
  • 13
  • 23
0
votes
1 answer

XPATH query to select parent based on matching child element conditon

I am trying to parse the below xml to fetch the ScId element values based on certain condition. This condition is mentioned in the xpath string and then select the ScId value in xpathNext string.
technocrat
  • 701
  • 5
  • 13
  • 23
0
votes
0 answers

How to match all attributes given a known namespace uri?

With the help of VTD-XML, I want to find all attributes belonging to a namespace knowing only its uri. Here is my code: VTDGen vg = new VTDGen(); vg.setDoc("
Stephan
  • 41,764
  • 65
  • 238
  • 329
0
votes
0 answers

VTD-XML declareVariableExpr invalid char #

I want to declare a variable Expression with the function declareVariableExpr(..,..) but in the value of my variable I have the "#" character. VTD returns an error for this char, saying it is an invalid char. Anyone can help me to resolve this…
onizuk_1
  • 1
  • 2
0
votes
1 answer

How can I get rid of the EOFException when using vtd-xml in c++?

I am writing a program to process an old dataset in c++. I've already managed to convert the files from sgml to xml using the sx tool from James Clark. Since I have past experience using vtd-xml with Matlab (which is java based), and since vtd-xml…
Joe Cole
  • 101
  • 8
0
votes
1 answer

Encoding issues with vtd-xml

I am encountering encoding issues with when using the vtd-xml library (version 2.11). @Test public void test() throws Exception { final String originalXML = "\r\n" + "\r\n" + "öäüß\r\n" + "\r\n" + ""; …
Paul
  • 547
  • 4
  • 13
  • 30
0
votes
2 answers

Return List of Objects from Spring Batch Custom ItemReader

I have a requirement to process thousands of Payments..So I used VtdXml instead of StaxEventItemReader in Spring Batch, I have created Custom Item Reader for the same. In order to read huge xml with Multi Threading, I have created partition with 10…
0
votes
1 answer

VTD-XML shadows namespace from sibling element and add unexpected ns

I have an issue when trying to extract element via getElementFragmentNs. Here sample test: @Test public void shouldNotShadowNamespaceAndAddSiblingNamespaces() throws Exception { byte[] bytes = ("
RoninDev
  • 5,446
  • 3
  • 23
  • 37
0
votes
1 answer

How to improve performance of querying xml file with VTD-XML and XPath?

I am querying XML files with size of around 1 MB(20k+ lines). I am using XPath to describe what I want to get and VTD-XML library to get it. I think that I have some problems with performance. The problem is, I am making about 5k+ queries to XML…
Cezary
  • 35
  • 4