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
6
votes
2 answers

Using xpath and vtd-xml to get sub nodes and text of an element as a string

This is a portion of my XML:
string1 string2 string3 string4 string5 string6 string7 string8 string9
I want to get the content of all the tags…
Alex
  • 616
  • 1
  • 12
  • 28
5
votes
2 answers

VTD-XML in Java - Find index after XMLModifier.insertAfterElement

I've started using VTD (I guess VTD-XML) in Java, and for XPath reads it's excellent. Where i'm hitting an issue now is with inserting data. Lets say I am doing the following: VTDNav nav = preExistingGen.getNav(); AutoPilot pilot = new…
jpcamara
  • 672
  • 6
  • 18
5
votes
1 answer

How to put nested XML file elements to list of objects with VTD-XML parser?

I have big, very nested XML file. All entities and attributes are going to be my Object variables. I'm creating list of such objects. I know how to do it with DOM, SAX and XMLPullParser and it works fine but I have problem with VTD parser. ListView…
4
votes
1 answer

Optimizing speed of parsing XML file using VTD-XML

I am in the process of parsing a lot of XML-files using VTD-XML. I am unsure whether I use the tool correctly - I think so, but parsing the files is taking me too long. The xml-files (in DATEXII-format) are zipped files on the HD. Unpacked they are…
hinsbergen
  • 147
  • 2
  • 11
4
votes
4 answers

xpath to get the entire xml tree structure

Is there a way using xpath to obtain the entire tree structure. For example, say this is the xml data I would like the xpath to pick up all the contents of the node and the result should be …
Ramesh Patil
  • 41
  • 1
  • 1
  • 4
4
votes
1 answer

How do I get all the namespace declarations of ONE element with VTD-XML?

I am using VTD-XML and I am extracting a child element of an XML document and I need to retrieve all of the namespace declarations of the root element of the parent XML. I am currently retrieving all of the namespace declarations in the following…
user1113792
  • 91
  • 1
  • 7
4
votes
3 answers

Mockito spy returns different result than actual method call

I have the following code: public Object parse(){ .... VTDGen vg = new VTDGen(); boolean parsed = vg.parseFile(myFile.getAbsolutePath(), false); } I am writing a unit test for this method. When I run the method without mocking…
John B
  • 32,493
  • 6
  • 77
  • 98
4
votes
2 answers

Getting text of attribute in xml using vtd-xml in java

Given the following xml: Lorem ipsum... .... ... I am using vtd-xml with XPath in order to retrieve 'textGoal' as follows: VTDGen vg = new VTDGen(); …
Alex
  • 616
  • 1
  • 12
  • 28
4
votes
1 answer

VTD-XML Huge Data xPathExpression not working with name space

I have a small test file when running with namespace huge fails. If I remove namespace both work am I doing something wrong with Huge code? Changed to remove unworkable code try { //without namespace works VTDGen vtdGen = new…
Pete
  • 41
  • 3
4
votes
0 answers

How can I remove a Node with VTD-XML in huge files?

I have a huge XML file with the following structure: 24 26 1 1 ... The element 'a' is several 100 000 times in the document. I want to remove some elements…
stJando
  • 41
  • 1
4
votes
2 answers

How can I split large xml into small chunks using VTDGenHuge?

I want split large xml into small chunks. I am using VTDGen to split the xml file into small chunks and it works fine for file size < 2 GB. VTD-xml uses IN-Memory to parse the xml where i don't want to load the xml in to memory . So i am trying to…
Naveen
  • 366
  • 3
  • 12
4
votes
2 answers

Can VTD-XML take a String as an input?

Hey, I'm trying to use VTD-XML to parse XML given to it as a String, but I can't find how to do it. Any help would be appreciated. http://vtd-xml.sourceforge.net
Concept
  • 43
  • 1
  • 3
4
votes
1 answer

Best way to compare two very large XML files record by record

I have two large XML files (3GB, 80000 records). One is updated version of another. I want to identify which records changed (were added/updated/deleted). There are some timestamps in the files, but I am not sure they can be trusted. Same with order…
Alexandre Rafalovitch
  • 9,709
  • 1
  • 24
  • 27
3
votes
1 answer

Is VTD-XML thread safe? (Java version)

Because if it thread safe I can use just one instance of VTDGen for the entire application. Right now I am instantiating a new VTDGen for every requests, I am thinking of making it static so that it is initialized just once.
Rosdi Kasim
  • 24,267
  • 23
  • 130
  • 154
3
votes
1 answer

Splitting of a large XML file into small Chunks based on repeated elements

Consider the following XML with 500 MB data ... ... ... ..
Anupam Alok
  • 433
  • 3
  • 17
1
2 3
12 13