You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(6) |
Jul
(21) |
Aug
(40) |
Sep
(7) |
Oct
(41) |
Nov
(52) |
Dec
(19) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(49) |
Feb
(37) |
Mar
(84) |
Apr
(11) |
May
(29) |
Jun
(9) |
Jul
(19) |
Aug
(9) |
Sep
(6) |
Oct
(5) |
Nov
(15) |
Dec
(3) |
| 2008 |
Jan
(7) |
Feb
(11) |
Mar
(25) |
Apr
(50) |
May
(7) |
Jun
(8) |
Jul
(10) |
Aug
(18) |
Sep
(1) |
Oct
(15) |
Nov
(1) |
Dec
(9) |
| 2009 |
Jan
(5) |
Feb
(2) |
Mar
(3) |
Apr
(5) |
May
(10) |
Jun
(4) |
Jul
(5) |
Aug
(5) |
Sep
(7) |
Oct
(15) |
Nov
(13) |
Dec
(6) |
| 2010 |
Jan
|
Feb
(3) |
Mar
(4) |
Apr
(6) |
May
|
Jun
(4) |
Jul
(12) |
Aug
(8) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2011 |
Jan
(19) |
Feb
(39) |
Mar
(28) |
Apr
(6) |
May
(7) |
Jun
(9) |
Jul
|
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(3) |
Dec
(12) |
| 2012 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
(4) |
May
(4) |
Jun
(3) |
Jul
(10) |
Aug
(2) |
Sep
(13) |
Oct
(24) |
Nov
(3) |
Dec
(1) |
| 2013 |
Jan
(11) |
Feb
(5) |
Mar
(4) |
Apr
(3) |
May
(3) |
Jun
(5) |
Jul
(7) |
Aug
(16) |
Sep
|
Oct
(7) |
Nov
(11) |
Dec
|
| 2014 |
Jan
(7) |
Feb
(4) |
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(3) |
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(11) |
May
(8) |
Jun
(3) |
Jul
(1) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(3) |
May
(7) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
(2) |
Jun
|
Jul
(4) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
| 2019 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: florian k. <flo...@it...> - 2013-11-04 20:25:13
|
Yes, according to the forum that problem should be solved. Ok, will give it a try. Von: jz...@xi... [mailto:jz...@xi...] Gesendet: Montag, 4. November 2013 20:23 An: 'florian kammermann'; vtd...@li... Betreff: Re: [Vtd-xml-users] VTDGenHuge.parseFile() leaves the InputStream open I believe that problem has been solved, and checked into CVS, you can check out teh vtdGenHuge.java from cvs and give a try? ----- Original Message ----- From: "florian kammermann" <flo...@it...> To: <vtd...@li...> Cc: Sent: Mon, 4 Nov 2013 14:36:22 +0100 Subject: [Vtd-xml-users] VTDGenHuge.parseFile() leaves the InputStream open Just wanted to ask, how the status of this thread is https://sourceforge.net/p/vtd-xml/discussion/379067/thread/dc1a952a/?limit=25#0db6 And if there is a roadmap for the next release? Regards Florian Kammermann |
|
From: <jz...@xi...> - 2013-11-04 19:22:49
|
I believe that problem has been solved, and checked into CVS, you can check out teh vtdGenHuge.java from cvs and give a try? ----- Original Message ----- From: "florian kammermann" To: Cc: Sent:Mon, 4 Nov 2013 14:36:22 +0100 Subject:[Vtd-xml-users] VTDGenHuge.parseFile() leaves the InputStream open Just wanted to ask, how the status of this thread is https://sourceforge.net/p/vtd-xml/discussion/379067/thread/dc1a952a/?limit=25#0db6 [1] And if there is a roadmap for the next release? Regards Florian Kammermann Links: ------ [1] https://sourceforge.net/p/vtd-xml/discussion/379067/thread/dc1a952a/?limit=25#0db6 |
|
From: florian k. <flo...@it...> - 2013-11-04 13:36:44
|
Just wanted to ask, how the status of this thread is https://sourceforge.net/p/vtd-xml/discussion/379067/thread/dc1a952a/?limit=2 5#0db6 And if there is a roadmap for the next release? Regards Florian Kammermann |
|
From: Riccardo P. <ric...@gm...> - 2013-10-29 10:33:23
|
Thanks Erik.
Thanks for the bitshift correction this was a typo from some code found on
Stack Overflow.
The problem using namespaces is that I have to know them before the file
parsing process.
The namespaces anyway could be declared randomly at runtime. So sometimes I
have p,p1,... other I have head,body,
other times random strings.
Namespaces are useful for XSD check only but when I need the data
namespaces are problem.
The perfect algorythm do:
1) open XML
2) Extract namespaces and associated XSD
3) Apply XSD
4) From XSD get the correct XPATH for the version (it could change if
grammar change) using factory patern
5) Create the XPATH + Namespaces
6) Declare namespaces and Apply XPATH
This is my final purpose but is a bit long to build.
So for my firs test I need to replace the standard Java XPATH
implementation that has namespaces
---Riccardo Prandini
Please consider the environment before printing this email
2013/10/29 Erik Fäßler <eri...@un...>
> Hi all,
>
> I actually don’t know what switching off the namespace awareness should
> cause exactly. However, you can easily solve your problem by just using the
> name spaces. You have to declare them to the AutoPilot object for this to
> work:
>
> ap.declareXPathNamespace(… , …)
>
> Then, you specify your XPath with the namespace prefixes like I have shown
> below in the algorithm.
>
> On a second note, you got the bit shifting operation to obtain the
> contentFragment string wrong.
> With (int)l you get the LOWER 4 bytes. To get the UPPER you need to shift
> the leftmost bits to the right like this: (int)(l>>32).
>
> The final algorithm that works for me looks like this:
>
> VTDGen vg = new VTDGen();
> vg.parseFile(fileToProcess.getAbsolutePath(), true);// Needs to
> be set to true for this example
> VTDNav vn = vg.getNav();
> AutoPilot ap = new AutoPilot(vn);
> ap.declareXPathNameSpace("p", "urn:CBI:xsd:CBIBdySDDReq.00.00.06"
> );
> ap.selectXPath(
> "/p:CBIBdySDDReq/p:CBIEnvelSDDReqLogMsg/p:CBISDDReqLogMsg");
> int i=-1;
> //the upper 32 bits is the length of the fragment, lower 32 bit
> is the offset
>
>
> while((i=ap.evalXPath())!=-1){
> long l = vn.getContentFragment();
>
>
> System.out.println(" -==> "+ vn.toString((int)(l), (int
> )(l>>32)));
> }
>
> Hope this helps!
>
> Best,
>
> Erik
>
> On 23 Oct 2013, at 17:20, Riccardo Prandini <ric...@gm...>
> wrote:
>
> I'm doing as you suggested me. Anyway i have a problem with namespaces.
>
> the real file (now i have It) id this
>
> <?xml version="1.0" encoding="UTF-8"?>
> <p:CBIBdySDDReq xmlns:p="urn:CBI:xsd:CBIBdySDDReq.00.00.06"
> xmlns:p1="urn:CBI:xsd:CBISDDReqLogMsg.00.00.06"
> xmlns:p2="urn:CBI:xsd:CBISgnInf.001.04" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:CBI:xsd:CBIBdySDDReq.00.00.06
> CBIBdySDDReq.00.00.06.xsd ">
> <p:PhyMsgInf>
> <p:PhyMsgTpCd>INC-SDDC-01</p:PhyMsgTpCd>
> <p:NumLogMsg>2</p:NumLogMsg>
> </p:PhyMsgInf>
> <p:CBIEnvelSDDReqLogMsg>
> <p:CBISDDReqLogMsg>
> <p1:GrpHdr>
> ......
> </p1:GrpHdr>
> </p:CBISDDReqLogMsg>
> <p:CBISDDReqLogMsg>
> ....
> </p:CBISDDReqLogMsg>
> </p:CBIEnvelSDDReqLogMsg>
> </p:CBIBdySDDReq>
>
> As I told I have to create in this case two files so composed:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <p:CBIBdySDDReq xmlns:p="urn:CBI:xsd:CBIBdySDDReq.00.00.06"
> xmlns:p1="urn:CBI:xsd:CBISDDReqLogMsg.00.00.06"
> xmlns:p2="urn:CBI:xsd:CBISgnInf.001.04" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:CBI:xsd:CBIBdySDDReq.00.00.06
> CBIBdySDDReq.00.00.06.xsd ">
> <p:PhyMsgInf>
> <p:PhyMsgTpCd>INC-SDDC-01</p:PhyMsgTpCd>
> <p:NumLogMsg>1</p:NumLogMsg><!-- This has beeen changed -->
> </p:PhyMsgInf>
> <p:CBIEnvelSDDReqLogMsg>
> <p:CBISDDReqLogMsg><!-- first one remain-->
> <p1:GrpHdr>
> ......
> </p1:GrpHdr>
> </p:CBISDDReqLogMsg>
>
> </p:CBIEnvelSDDReqLogMsg>
> </p:CBIBdySDDReq>
>
> -------------------------------------------------------------------
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <p:CBIBdySDDReq xmlns:p="urn:CBI:xsd:CBIBdySDDReq.00.00.06"
> xmlns:p1="urn:CBI:xsd:CBISDDReqLogMsg.00.00.06"
> xmlns:p2="urn:CBI:xsd:CBISgnInf.001.04" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:CBI:xsd:CBIBdySDDReq.00.00.06
> CBIBdySDDReq.00.00.06.xsd ">
> <p:PhyMsgInf>
> <p:PhyMsgTpCd>INC-SDDC-01</p:PhyMsgTpCd>
> <p:NumLogMsg>1</p:NumLogMsg><!-- This has beeen changed -->
> </p:PhyMsgInf>
> <p:CBIEnvelSDDReqLogMsg>
> <p:CBISDDReqLogMsg><!-- second one remain-->
> ......
> </p:CBISDDReqLogMsg>
>
> </p:CBIEnvelSDDReqLogMsg>
> </p:CBIBdySDDReq>
>
>
> ------------------------------------------------------------------------------------------------------------
>
>
> To do this i have created some xpath
>
> /CBIBdySDDReq/CBIEnvelSDDReqLogMsg/CBISDDReqLogMsg
>
> but i have the prblem of namespaces namespaces for me are not useful I
> need to leave them untouched.
>
> this one is the snippet to extract or move on each message but I have the
> error in xpath if I use p: --> no url if I don't use namespaces i get error.
>
> VTDGen vg = new VTDGen();
> vg.parseFile(fileToProcess.getAbsolutePath(), true);// Setting
> true o false it is not working
> VTDNav vn = vg.getNav();
> AutoPilot ap = new AutoPilot(vn);
>
> ap.selectXPath("/CBIBdySDDReq/CBIEnvelSDDReqLogMsg/CBISDDReqLogMsg");
> int i=-1;
> //the upper 32 bits is the length of the fragment, lower 32 bit
> is the offset
>
> while((i=ap.evalXPath())!=-1){
> long l = vn.getContentFragment();
>
> System.out.println(" -==> "+ vn.toString((int)l,
> (int)(l<<32)));
> }
>
>
> Have you got some suggestion about namespace problem?
>
>
>
>
>
>
> ---Riccardo Prandini
> Please consider the environment before printing this email
>
>
> 2013/10/14 <jz...@xi...>
>
>> that was an old article, vtd-xml has become a lot better since
>>
>>
>>
>> ----- Original Message -----
>> From:
>> Riccardo Prandini <ric...@gm...>
>>
>> To:
>> <jz...@xi...>
>> Cc:
>> "vtd...@li..." <
>> vtd...@li...>
>> Sent:
>> Mon, 14 Oct 2013 09:31:46 +0200
>> Subject:
>> Re: [Vtd-xml-users] Create derivate file from big XML
>>
>>
>>
>> Wow I never thought of this great solution.
>>
>> Impressive.
>>
>> I tried to use this article, but I have not resolved it. Your solution is
>> much more elegant.
>> http://www.javaworld.com/javaworld/jw-07-2006/jw-0724-vtdxml.html?page=4
>>
>>
>> ---Riccardo Prandini
>> Please consider the environment before printing this email
>>
>>
>> 2013/10/14 <jz...@xi...>
>>
>>> I think what you can do is to
>>>
>>> 1. find the body tag
>>> 2. call getContentFragment()
>>> 3. remove it using XMLModifier
>>> 4, get the <part> tag of interest
>>> 5. call getElementFragment()
>>> 6, go back to body tag, call insertAfterHead()
>>>
>>> repeat this for each other part element, you will get 5 xml files as you
>>> have described..
>>>
>>>
>>>
>>>
>>> ----- Original Message -----
>>> From:
>>> Riccardo Prandini <ric...@gm...>
>>>
>>> To:
>>> "vtd...@li..." <
>>> vtd...@li...>
>>> Cc:
>>>
>>> Sent:
>>> Sun, 13 Oct 2013 11:49:58 +0200
>>> Subject:
>>> [Vtd-xml-users] Create derivate file from big XML
>>>
>>>
>>>
>>> Hi,
>>>
>>> I have a file with an header, and a body i need to get n file with same
>>> hader and only one part for each file. If I have 10 part i get 10 files.
>>> What is the best approach?.
>>> Actually I'm using JAXB(totally different) but i like to try vtd-xml.
>>> from:
>>> ----------------
>>> <file>
>>> <head>...<head>
>>> <body>
>>> <part>1</part>
>>> <part>2</part>
>>> <part>3</part>
>>> <part>4</part>
>>> <part>5</part>
>>> </body>
>>> <file>
>>> ---------------
>>> to:
>>> ---------------
>>> <file>
>>> <head>...<head>
>>> <body>
>>> <part>n</part>
>>> </body>
>>> <file>
>>> -----------------------
>>>
>>>
>>>
>>>
>>>
>>> ---Riccardo Prandini
>>> Please consider the environment before printing this email
>>>
>>>
>>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
>
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk_______________________________________________
> Vtd-xml-users mailing list
> Vtd...@li...
> https://lists.sourceforge.net/lists/listinfo/vtd-xml-users
>
>
>
|
|
From: Erik F. <eri...@un...> - 2013-10-29 07:47:17
|
Hi all,
I actually don’t know what switching off the namespace awareness should cause exactly. However, you can easily solve your problem by just using the name spaces. You have to declare them to the AutoPilot object for this to work:
ap.declareXPathNamespace(… , …)
Then, you specify your XPath with the namespace prefixes like I have shown below in the algorithm.
On a second note, you got the bit shifting operation to obtain the contentFragment string wrong.
With (int)l you get the LOWER 4 bytes. To get the UPPER you need to shift the leftmost bits to the right like this: (int)(l>>32).
The final algorithm that works for me looks like this:
VTDGen vg = new VTDGen();
vg.parseFile(fileToProcess.getAbsolutePath(), true);// Needs to be set to true for this example
VTDNav vn = vg.getNav();
AutoPilot ap = new AutoPilot(vn);
ap.declareXPathNameSpace("p", "urn:CBI:xsd:CBIBdySDDReq.00.00.06");
ap.selectXPath("/p:CBIBdySDDReq/p:CBIEnvelSDDReqLogMsg/p:CBISDDReqLogMsg");
int i=-1;
//the upper 32 bits is the length of the fragment, lower 32 bit is the offset
while((i=ap.evalXPath())!=-1){
long l = vn.getContentFragment();
System.out.println(" -==> "+ vn.toString((int)(l), (int)(l>>32)));
}
Hope this helps!
Best,
Erik
On 23 Oct 2013, at 17:20, Riccardo Prandini <ric...@gm...> wrote:
> I'm doing as you suggested me. Anyway i have a problem with namespaces.
>
> the real file (now i have It) id this
>
> <?xml version="1.0" encoding="UTF-8"?>
> <p:CBIBdySDDReq xmlns:p="urn:CBI:xsd:CBIBdySDDReq.00.00.06" xmlns:p1="urn:CBI:xsd:CBISDDReqLogMsg.00.00.06" xmlns:p2="urn:CBI:xsd:CBISgnInf.001.04" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:CBI:xsd:CBIBdySDDReq.00.00.06 CBIBdySDDReq.00.00.06.xsd ">
> <p:PhyMsgInf>
> <p:PhyMsgTpCd>INC-SDDC-01</p:PhyMsgTpCd>
> <p:NumLogMsg>2</p:NumLogMsg>
> </p:PhyMsgInf>
> <p:CBIEnvelSDDReqLogMsg>
> <p:CBISDDReqLogMsg>
> <p1:GrpHdr>
> ......
> </p1:GrpHdr>
> </p:CBISDDReqLogMsg>
> <p:CBISDDReqLogMsg>
> ....
> </p:CBISDDReqLogMsg>
> </p:CBIEnvelSDDReqLogMsg>
> </p:CBIBdySDDReq>
>
> As I told I have to create in this case two files so composed:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <p:CBIBdySDDReq xmlns:p="urn:CBI:xsd:CBIBdySDDReq.00.00.06" xmlns:p1="urn:CBI:xsd:CBISDDReqLogMsg.00.00.06" xmlns:p2="urn:CBI:xsd:CBISgnInf.001.04" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:CBI:xsd:CBIBdySDDReq.00.00.06 CBIBdySDDReq.00.00.06.xsd ">
> <p:PhyMsgInf>
> <p:PhyMsgTpCd>INC-SDDC-01</p:PhyMsgTpCd>
> <p:NumLogMsg>1</p:NumLogMsg><!-- This has beeen changed -->
> </p:PhyMsgInf>
> <p:CBIEnvelSDDReqLogMsg>
> <p:CBISDDReqLogMsg><!-- first one remain-->
> <p1:GrpHdr>
> ......
> </p1:GrpHdr>
> </p:CBISDDReqLogMsg>
>
> </p:CBIEnvelSDDReqLogMsg>
> </p:CBIBdySDDReq>
>
> -------------------------------------------------------------------
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <p:CBIBdySDDReq xmlns:p="urn:CBI:xsd:CBIBdySDDReq.00.00.06" xmlns:p1="urn:CBI:xsd:CBISDDReqLogMsg.00.00.06" xmlns:p2="urn:CBI:xsd:CBISgnInf.001.04" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:CBI:xsd:CBIBdySDDReq.00.00.06 CBIBdySDDReq.00.00.06.xsd ">
> <p:PhyMsgInf>
> <p:PhyMsgTpCd>INC-SDDC-01</p:PhyMsgTpCd>
> <p:NumLogMsg>1</p:NumLogMsg><!-- This has beeen changed -->
> </p:PhyMsgInf>
> <p:CBIEnvelSDDReqLogMsg>
> <p:CBISDDReqLogMsg><!-- second one remain-->
> ......
> </p:CBISDDReqLogMsg>
>
> </p:CBIEnvelSDDReqLogMsg>
> </p:CBIBdySDDReq>
>
> ------------------------------------------------------------------------------------------------------------
>
>
> To do this i have created some xpath
>
> /CBIBdySDDReq/CBIEnvelSDDReqLogMsg/CBISDDReqLogMsg
>
> but i have the prblem of namespaces namespaces for me are not useful I need to leave them untouched.
>
> this one is the snippet to extract or move on each message but I have the error in xpath if I use p: --> no url if I don't use namespaces i get error.
>
> VTDGen vg = new VTDGen();
> vg.parseFile(fileToProcess.getAbsolutePath(), true);// Setting true o false it is not working
> VTDNav vn = vg.getNav();
> AutoPilot ap = new AutoPilot(vn);
> ap.selectXPath("/CBIBdySDDReq/CBIEnvelSDDReqLogMsg/CBISDDReqLogMsg");
> int i=-1;
> //the upper 32 bits is the length of the fragment, lower 32 bit is the offset
>
> while((i=ap.evalXPath())!=-1){
> long l = vn.getContentFragment();
>
> System.out.println(" -==> "+ vn.toString((int)l, (int)(l<<32)));
> }
>
>
> Have you got some suggestion about namespace problem?
>
>
>
>
>
>
> ---Riccardo Prandini
> Please consider the environment before printing this email
>
>
> 2013/10/14 <jz...@xi...>
> that was an old article, vtd-xml has become a lot better since
>
>
>
> ----- Original Message -----
> From:
> Riccardo Prandini <ric...@gm...>
>
> To:
> <jz...@xi...>
> Cc:
> "vtd...@li..." <vtd...@li...>
> Sent:
> Mon, 14 Oct 2013 09:31:46 +0200
> Subject:
> Re: [Vtd-xml-users] Create derivate file from big XML
>
>
>
> Wow I never thought of this great solution.
>
> Impressive.
>
> I tried to use this article, but I have not resolved it. Your solution is much more elegant.
> http://www.javaworld.com/javaworld/jw-07-2006/jw-0724-vtdxml.html?page=4
>
>
> ---Riccardo Prandini
> Please consider the environment before printing this email
>
>
> 2013/10/14 <jz...@xi...>
> I think what you can do is to
>
> 1. find the body tag
> 2. call getContentFragment()
> 3. remove it using XMLModifier
> 4, get the <part> tag of interest
> 5. call getElementFragment()
> 6, go back to body tag, call insertAfterHead()
>
> repeat this for each other part element, you will get 5 xml files as you have described..
>
>
>
>
> ----- Original Message -----
> From:
> Riccardo Prandini <ric...@gm...>
>
> To:
> "vtd...@li..." <vtd...@li...>
> Cc:
>
> Sent:
> Sun, 13 Oct 2013 11:49:58 +0200
> Subject:
> [Vtd-xml-users] Create derivate file from big XML
>
>
>
> Hi,
>
> I have a file with an header, and a body i need to get n file with same hader and only one part for each file. If I have 10 part i get 10 files. What is the best approach?.
> Actually I'm using JAXB(totally different) but i like to try vtd-xml.
> from:
> ----------------
> <file>
> <head>...<head>
> <body>
> <part>1</part>
> <part>2</part>
> <part>3</part>
> <part>4</part>
> <part>5</part>
> </body>
> <file>
> ---------------
> to:
> ---------------
> <file>
> <head>...<head>
> <body>
> <part>n</part>
> </body>
> <file>
> -----------------------
>
>
>
>
>
> ---Riccardo Prandini
> Please consider the environment before printing this email
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk_______________________________________________
> Vtd-xml-users mailing list
> Vtd...@li...
> https://lists.sourceforge.net/lists/listinfo/vtd-xml-users
|
|
From: Riccardo P. <ric...@gm...> - 2013-10-23 15:20:39
|
I'm doing as you suggested me. Anyway i have a problem with namespaces. the real file (now i have It) id this <?xml version="1.0" encoding="UTF-8"?> <p:CBIBdySDDReq xmlns:p="urn:CBI:xsd:CBIBdySDDReq.00.00.06" xmlns:p1="urn:CBI:xsd:CBISDDReqLogMsg.00.00.06" xmlns:p2="urn:CBI:xsd:CBISgnInf.001.04" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:CBI:xsd:CBIBdySDDReq.00.00.06 CBIBdySDDReq.00.00.06.xsd "> <p:PhyMsgInf> <p:PhyMsgTpCd>INC-SDDC-01</p:PhyMsgTpCd> <p:NumLogMsg>2</p:NumLogMsg> </p:PhyMsgInf> <p:CBIEnvelSDDReqLogMsg> <p:CBISDDReqLogMsg> <p1:GrpHdr> ...... </p1:GrpHdr> </p:CBISDDReqLogMsg> <p:CBISDDReqLogMsg> .... </p:CBISDDReqLogMsg> </p:CBIEnvelSDDReqLogMsg> </p:CBIBdySDDReq> As I told I have to create in this case two files so composed: <?xml version="1.0" encoding="UTF-8"?> <p:CBIBdySDDReq xmlns:p="urn:CBI:xsd:CBIBdySDDReq.00.00.06" xmlns:p1="urn:CBI:xsd:CBISDDReqLogMsg.00.00.06" xmlns:p2="urn:CBI:xsd:CBISgnInf.001.04" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:CBI:xsd:CBIBdySDDReq.00.00.06 CBIBdySDDReq.00.00.06.xsd "> <p:PhyMsgInf> <p:PhyMsgTpCd>INC-SDDC-01</p:PhyMsgTpCd> <p:NumLogMsg>1</p:NumLogMsg><!-- This has beeen changed --> </p:PhyMsgInf> <p:CBIEnvelSDDReqLogMsg> <p:CBISDDReqLogMsg><!-- first one remain--> <p1:GrpHdr> ...... </p1:GrpHdr> </p:CBISDDReqLogMsg> </p:CBIEnvelSDDReqLogMsg> </p:CBIBdySDDReq> ------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <p:CBIBdySDDReq xmlns:p="urn:CBI:xsd:CBIBdySDDReq.00.00.06" xmlns:p1="urn:CBI:xsd:CBISDDReqLogMsg.00.00.06" xmlns:p2="urn:CBI:xsd:CBISgnInf.001.04" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:CBI:xsd:CBIBdySDDReq.00.00.06 CBIBdySDDReq.00.00.06.xsd "> <p:PhyMsgInf> <p:PhyMsgTpCd>INC-SDDC-01</p:PhyMsgTpCd> <p:NumLogMsg>1</p:NumLogMsg><!-- This has beeen changed --> </p:PhyMsgInf> <p:CBIEnvelSDDReqLogMsg> <p:CBISDDReqLogMsg><!-- second one remain--> ...... </p:CBISDDReqLogMsg> </p:CBIEnvelSDDReqLogMsg> </p:CBIBdySDDReq> ------------------------------------------------------------------------------------------------------------ To do this i have created some xpath /CBIBdySDDReq/CBIEnvelSDDReqLogMsg/CBISDDReqLogMsg but i have the prblem of namespaces namespaces for me are not useful I need to leave them untouched. this one is the snippet to extract or move on each message but I have the error in xpath if I use p: --> no url if I don't use namespaces i get error. VTDGen vg = new VTDGen(); vg.parseFile(fileToProcess.getAbsolutePath(), true);// Setting true o false it is not working VTDNav vn = vg.getNav(); AutoPilot ap = new AutoPilot(vn); ap.selectXPath("/CBIBdySDDReq/CBIEnvelSDDReqLogMsg/CBISDDReqLogMsg"); int i=-1; //the upper 32 bits is the length of the fragment, lower 32 bit is the offset while((i=ap.evalXPath())!=-1){ long l = vn.getContentFragment(); System.out.println(" -==> "+ vn.toString((int)l, (int)(l<<32))); } Have you got some suggestion about namespace problem? ---Riccardo Prandini Please consider the environment before printing this email 2013/10/14 <jz...@xi...> > that was an old article, vtd-xml has become a lot better since > > > > ----- Original Message ----- > From: > Riccardo Prandini <ric...@gm...> > > To: > <jz...@xi...> > Cc: > "vtd...@li..." <vtd...@li... > > > Sent: > Mon, 14 Oct 2013 09:31:46 +0200 > Subject: > Re: [Vtd-xml-users] Create derivate file from big XML > > > > Wow I never thought of this great solution. > > Impressive. > > I tried to use this article, but I have not resolved it. Your solution is > much more elegant. > http://www.javaworld.com/javaworld/jw-07-2006/jw-0724-vtdxml.html?page=4 > > > ---Riccardo Prandini > Please consider the environment before printing this email > > > 2013/10/14 <jz...@xi...> > >> I think what you can do is to >> >> 1. find the body tag >> 2. call getContentFragment() >> 3. remove it using XMLModifier >> 4, get the <part> tag of interest >> 5. call getElementFragment() >> 6, go back to body tag, call insertAfterHead() >> >> repeat this for each other part element, you will get 5 xml files as you >> have described.. >> >> >> >> >> ----- Original Message ----- >> From: >> Riccardo Prandini <ric...@gm...> >> >> To: >> "vtd...@li..." < >> vtd...@li...> >> Cc: >> >> Sent: >> Sun, 13 Oct 2013 11:49:58 +0200 >> Subject: >> [Vtd-xml-users] Create derivate file from big XML >> >> >> >> Hi, >> >> I have a file with an header, and a body i need to get n file with same >> hader and only one part for each file. If I have 10 part i get 10 files. >> What is the best approach?. >> Actually I'm using JAXB(totally different) but i like to try vtd-xml. >> from: >> ---------------- >> <file> >> <head>...<head> >> <body> >> <part>1</part> >> <part>2</part> >> <part>3</part> >> <part>4</part> >> <part>5</part> >> </body> >> <file> >> --------------- >> to: >> --------------- >> <file> >> <head>...<head> >> <body> >> <part>n</part> >> </body> >> <file> >> ----------------------- >> >> >> >> >> >> ---Riccardo Prandini >> Please consider the environment before printing this email >> >> > |
|
From: <jz...@xi...> - 2013-10-14 08:02:27
|
that was an old article, vtd-xml has become a lot better since ----- Original Message ----- From: Riccardo Prandini To: Cc:"vtd...@li..." Sent:Mon, 14 Oct 2013 09:31:46 +0200 Subject:Re: [Vtd-xml-users] Create derivate file from big XML Wow I never thought of this great solution. Impressive. I tried to use this article, but I have not resolved it. Your solution is much more elegant. http://www.javaworld.com/javaworld/jw-07-2006/jw-0724-vtdxml.html?page=4 [1] ---Riccardo Prandini Please consider the environment before printing this email 2013/10/14 I think what you can do is to 1. find the body tag2. call getContentFragment()3. remove it using XMLModifier4, get the tag of interest5. call getElementFragment() 6, go back to body tag, call insertAfterHead() repeat this for each other part element, you will get 5 xml files as you have described.. ----- Original Message ----- From: Riccardo Prandini To:"vtd...@li... [4]" Cc: Sent:Sun, 13 Oct 2013 11:49:58 +0200 Subject:[Vtd-xml-users] Create derivate file from big XML Hi, I have a file with an header, and a body i need to get n file with same hader and only one part for each file. If I have 10 part i get 10 files. What is the best approach?. Actually I'm using JAXB(totally different) but i like to try vtd-xml. from: ---------------- ... 1 2 3 4 5 --------------- to: --------------- ... n ----------------------- ---Riccardo Prandini Please consider the environment before printing this email Links: ------ [1] http://www.javaworld.com/javaworld/jw-07-2006/jw-0724-vtdxml.html?page=4 [2] mailto:jz...@xi... [3] mailto:ric...@gm... [4] mailto:vtd...@li... [5] mailto:vtd...@li... |
|
From: Riccardo P. <ric...@gm...> - 2013-10-14 07:32:13
|
Wow I never thought of this great solution. Impressive. I tried to use this article, but I have not resolved it. Your solution is much more elegant. http://www.javaworld.com/javaworld/jw-07-2006/jw-0724-vtdxml.html?page=4 ---Riccardo Prandini Please consider the environment before printing this email 2013/10/14 <jz...@xi...> > I think what you can do is to > > 1. find the body tag > 2. call getContentFragment() > 3. remove it using XMLModifier > 4, get the <part> tag of interest > 5. call getElementFragment() > 6, go back to body tag, call insertAfterHead() > > repeat this for each other part element, you will get 5 xml files as you > have described.. > > > > > ----- Original Message ----- > From: > Riccardo Prandini <ric...@gm...> > > To: > "vtd...@li..." <vtd...@li... > > > Cc: > > Sent: > Sun, 13 Oct 2013 11:49:58 +0200 > Subject: > [Vtd-xml-users] Create derivate file from big XML > > > > Hi, > > I have a file with an header, and a body i need to get n file with same > hader and only one part for each file. If I have 10 part i get 10 files. > What is the best approach?. > Actually I'm using JAXB(totally different) but i like to try vtd-xml. > from: > ---------------- > <file> > <head>...<head> > <body> > <part>1</part> > <part>2</part> > <part>3</part> > <part>4</part> > <part>5</part> > </body> > <file> > --------------- > to: > --------------- > <file> > <head>...<head> > <body> > <part>n</part> > </body> > <file> > ----------------------- > > > > > > ---Riccardo Prandini > Please consider the environment before printing this email > > |
|
From: <jz...@xi...> - 2013-10-14 00:35:55
|
I think what you can do is to 1. find the body tag2. call getContentFragment()3. remove it using XMLModifier4, get the tag of interest5. call getElementFragment()6, go back to body tag, call insertAfterHead() repeat this for each other part element, you will get 5 xml files as you have described... ----- Original Message ----- From: Riccardo Prandini To:"vtd...@li..." Cc: Sent:Sun, 13 Oct 2013 11:49:58 +0200 Subject:[Vtd-xml-users] Create derivate file from big XML Hi, I have a file with an header, and a body i need to get n file with same hader and only one part for each file. If I have 10 part i get 10 files. What is the best approach?. Actually I'm using JAXB(totally different) but i like to try vtd-xml. from: ---------------- ... 1 2 3 4 5 --------------- to: --------------- ... n ----------------------- ---Riccardo Prandini Please consider the environment before printing this email |
|
From: Riccardo P. <ric...@gm...> - 2013-10-13 09:50:24
|
Hi, I have a file with an header, and a body i need to get n file with same hader and only one part for each file. If I have 10 part i get 10 files. What is the best approach?. Actually I'm using JAXB(totally different) but i like to try vtd-xml. from: ---------------- <file> <head>...<head> <body> <part>1</part> <part>2</part> <part>3</part> <part>4</part> <part>5</part> </body> <file> --------------- to: --------------- <file> <head>...<head> <body> <part>n</part> </body> <file> ----------------------- ---Riccardo Prandini Please consider the environment before printing this email |
|
From: <jz...@xi...> - 2013-08-24 01:28:56
|
I can confirm that upper-case, lower-case and ends-with are supported, more to come in later releases ----- Original Message ----- From: jz...@xi... To:, Cc: Sent:Wed, 21 Aug 2013 13:54:31 -0500 Subject:Re: [Vtd-xml-users] Xpath 2.0 function list? vtd-xml supports ends-with, contains and starts-with, I have to dig a bit further to get to the full list ----- Original Message ----- From: To: Cc: Sent:Wed, 21 Aug 2013 18:28:54 +0000 Subject:[Vtd-xml-users] Xpath 2.0 function list? Found this in the FAQ: VTD-XML fully conforms with W3C XPath 1.0 recommendation. It supports all the built-in functions. It also supports many XPath 2.0 functions. Where can I find the list of XPath 2.0 functions that are supported ? Specifically interested in ends-with(). Thanks, Mike Links: ------ [1] mailto:mic...@th... [2] mailto:vtd...@li... |
|
From: <jz...@xi...> - 2013-08-23 20:18:15
|
To reuse xpath, all you need to do is keep AutoPilot object alive
after selecting xpath, you also need to call resetXPath(),
AutoPilot's internal caching is not for XPath compilation, it is
designed for speeding up repetitive xpath evaluation when the xpath is
absolute andresides within a predicate...
I can't tell for sure why there is no difference is performance (i
would have guessed that there is a huge difference), it might have to
do with your xpath expression evaluating to a string... try to
evaluate to a node set to see if you see any difference....
----- Original Message -----
From: Kalle Anka
To:
Cc:
Sent:Fri, 23 Aug 2013 16:03:38 +0100
Subject:Re: [Vtd-xml-users] XPath evaluation 3x-4x slower than JDK
with DOM?
Thanks for the quick reply.
I replaced my test XML file with a "real" one from my application
domain (~25MB in size) and inserted the test XML tags into middle of
it. I re-ran the test but there was virtually no difference in
performance using either evaluator.
I attached a debugger and confirmed what you suggested, that the
XPath compilation is by far the biggest contributor to the total time.
I cached the XPath compilation and got much better results.
I expected the AutoPilot object to do this caching already because
there is a method called enableCaching() which is by default enabled.
What is it caching if not the compiled XPath expression? I will
have 100's-1000's of XPath expressions that would need compilation
border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;">
Hi, The xml files you run tests are very very small. At those sizes,
the performance number you are getting from vtd-xml wll be dominated
by the performance of compile xpath expression, which is done by using
java cup and jflex, both external packages, so they are not good way
measure the performance of parsing and xpath evaluation... in reality,
those xpath compilations can be done once and reused many many times,
so even with some overhead, this can be easily optimized away
I am sure if you increase teh size of xml to a few k or MB in size,
or reuse xpath, you will see a dramatically improvement of
performance...
----- Original Message -----
From: Kalle Anka
To:
Cc:
Sent:Thu, 22 Aug 2013 15:46:50 +0100
Subject:[Vtd-xml-users] XPath evaluation 3x-4x slower than JDK with
DOM?
Hello,
I'm trying to evaluate the performance of vtd for my application
after perusing the benchmark results published on the main page.
However, I'm seeing quite a substantial difference in performance of
XPath evaluation between vtd and the standard DOM/JDK implementation.
My simple test evaluates a simple XPath expression ("name()") from
the context of a specific tag one million times in a row and these are
the results I am seeing (in ms):
Start DOMEnd DOMTime Taken : 3023.547643
Start VTD End VTDTime Taken : 10416.065461
My DOM implementation consistently outperforms the vtd 3x-4x. Am I
doing something wrong? I would be grateful for any feedback.
Note1: I've included the full code of my test at the end of this
e-mail. Note2: I've used the same XPath expression in each iteration
for testing purposes only, in reality there will be 1000's of
different expressions.
Note3: I'm using Java 7
import com.ximpleware.NavException;import
com.ximpleware.VTDGen;import com.ximpleware.VTDNav;import
com.ximpleware.XPathParseException;
import java.io.File; import java.io.IOException;import
java.util.concurrent.Callable;import
javax.xml.parsers.DocumentBuilderFactory;import
javax.xml.parsers.ParserConfigurationException; import
javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants;import
javax.xml.xpath.XPathExpression;import
javax.xml.xpath.XPathExpressionException;import
javax.xml.xpath.XPathFactory;
import org.w3c.dom.Document;import org.w3c.dom.Node;import
orgxml.sax.SAXException;
public class XPathTest {
private static final String NODE_SELECTION_EXPRESSION =
"//TestLevel3"; private static final String GET_NAME_EXPRESSION
= "name()";
private XPathTest() {}
public static void main(String[] args) { File file
= new File("xpath_test.xml"); [4] runXPathDomTest(file);
runXPathVtdTest(file); }
private static void runXPathDomTest(File file) {
runTest(new DomCallable(file), "DOM"); }
private static void runXPathVtdTest(File file) {
runTest(new VtdCallable(file), "VTD"); }
private static void runTest(Callable callable, String name) {
System.out.println(); System.out.println("Start "
+ name); long startTime = System.nanoTime(); try
{ for (int i = 0; i < 1000000; i++) {
String output = callable.call(); if
(!"TestLevel3"equals(output)) {
System.out.println("Failed: " + output);
break; } } }
catch (Exception exception) {
System.out.println(exception); } long endTime =
System.nanoTime(); double difference = (endTime -
startTime)/1e6; System.out.println("End " + name);
System.out.println("Time Taken : " + difference);
System.out.println(); }
private static class DomCallable implements Callable {
private final File fFile; private final Node
fNode; private final XPath fXPath;
private DomCallable(File file) { fFile =
file; try { Document document
=
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(file);
fXPath =
XPathFactory.newInstance().newXPath();
XPathExpression expression =
fXPath.compile(NODE_SELECTION_EXPRESSION);
fNode = (Node)expression.evaluate(document, XPathConstants.NODE);
} catch (ParserConfigurationException | SAXException |
IOException | XPathExpressionException exception) {
throw new RuntimeException(exception); }
}
@Override public String call() {
try { XPathExpression expression =
fXPath.compile(GET_NAME_EXPRESSION); return
(String)expression.evaluate(fNode, XPathConstants.STRING);
} catch (XPathExpressionException e) {
throw new RuntimeException(e); } }
}
private static class VtdCallable implements Callable {
private final File fFile; private final
AutoPilot fAutoPilot;
private VtdCallable(File file) { fFile =
file; VTDGen vg = new VTDGen();
vg.parseFile(fFile.getAbsolutePath(), false); VTDNav
vn = vg.getNav(); fAutoPilot = new AutoPilot(vn);
try {
fAutoPilot.selectElement(NODE_SELECTION_EXPRESSION);
fAutoPilot.iterate(); } catch (NavException
exception) { throw new
RuntimeException(exception); } }
@Override public String call() {
try {
fAutoPilot.selectXPath(GET_NAME_EXPRESSION);
return fAutoPilot.evalXPathToString(); } catch
(XPathParseException e) { throw new
RuntimeException(e); } }
}
}
=== END SOURCE CODE ===
Links:
------
[1] mailto:jz...@xi...
[2] mailto:kal...@gm...
[3] mailto:vtd...@li...
[4] http://test.xml
|
|
From: Kalle A. <kal...@gm...> - 2013-08-23 15:03:46
|
Thanks for the quick reply.
I replaced my test XML file with a "real" one from my application domain
(~25MB in size) and inserted the test XML tags into middle of it. I re-ran
the test but there was virtually no difference in performance using either
evaluator.
I attached a debugger and confirmed what you suggested, that the XPath
compilation is by far the biggest contributor to the total time. I cached
the XPath compilation and got much better results.
I expected the AutoPilot object to do this caching already because there is
a method called enableCaching() which is by default enabled. What is it
caching if not the compiled XPath expression? I will have 100's-1000's of
XPath expressions that would need compilation & caching, what is the best
way to do this? Will I need a new AutoPilot instance per XPath expression?
Thanks for your help,
/Kalle
On 23 August 2013 00:37, <jz...@xi...> wrote:
>
> Hi, The xml files you run tests are very very small. At those sizes, the
> performance number you are getting from vtd-xml wll be dominated by the
> performance of compile xpath expression, which is done by using java cup
> and jflex, both external
> packages, so they are not good way measure the performance of parsing and
> xpath evaluation... in reality, those xpath compilations can be done once
> and reused many many times, so even with some overhead, this can be easily
> optimized away
>
> I am sure if you increase teh size of xml to a few k or MB in size, or
> reuse xpath, you will see a dramatically improvement of performance...
>
>
> ----- Original Message -----
> From:
> Kalle Anka <kal...@gm...>
>
> To:
> <vtd...@li...>
> Cc:
>
> Sent:
> Thu, 22 Aug 2013 15:46:50 +0100
> Subject:
> [Vtd-xml-users] XPath evaluation 3x-4x slower than JDK with DOM?
>
>
>
> Hello,
>
> I'm trying to evaluate the performance of vtd for my application after
> perusing the benchmark results published on the main page. However, I'm
> seeing quite a substantial difference in performance of XPath evaluation
> between vtd and the standard DOM/JDK implementation.
>
> My simple test evaluates a simple XPath expression ("name()") from the
> context of a specific tag one million times in a row and these are the
> results I am seeing (in ms):
>
>
> Start DOM
> End DOM
> Time Taken : 3023.547643
>
>
> Start VTD
> End VTD
> Time Taken : 10416.065461
>
>
> My DOM implementation consistently outperforms the vtd 3x-4x. Am I doing
> something wrong? I would be grateful for any feedback.
>
> Note1: I've included the full code of my test at the end of this e-mail.
> Note2: I've used the same XPath expression in each iteration for testing
> purposes only, in reality there will be 1000's of different expressions.
> Note3: I'm using Java 7 & VTD-XML version 2.11
>
> Thanks,
>
> /Kalle
>
>
> === BEGIN TEST XML FILE ===
>
> <?xml version="1.0" encoding="utf-8"?>
> <TestLevel1>
> <TestLevel2>
> <TestLevel3 attr="test"></TestLevel3>
> </TestLevel2>
> </TestLevel1>
>
> === END TEST XML FILE ===
>
>
>
> === BEGIN SOURCE CODE ===
>
> import com.ximpleware.AutoPilot;
> import com.ximpleware.NavException;
> import com.ximpleware.VTDGen;
> import com.ximpleware.VTDNav;
> import com.ximpleware.XPathParseException;
>
> import java.io.File;
> import java.io.IOException;
> import java.util.concurrent.Callable;
> import javax.xml.parsers.DocumentBuilderFactory;
> import javax.xml.parsers.ParserConfigurationException;
> import javax.xml.xpath.XPath;
> import javax.xml.xpath.XPathConstants;
> import javax.xml.xpath.XPathExpression;
> import javax.xml.xpath.XPathExpressionException;
> import javax.xml.xpath.XPathFactory;
>
> import org.w3c.dom.Document;
> import org.w3c.dom.Node;
> import org.xml.sax.SAXException;
>
>
> public class XPathTest {
>
> private static final String NODE_SELECTION_EXPRESSION = "//TestLevel3";
> private static final String GET_NAME_EXPRESSION = "name()";
>
> private XPathTest() {}
>
>
>
>
> public static void main(String[] args) {
> File file = new File("xpath_test.xml"); <http://test.xml>
> runXPathDomTest(file);
> runXPathVtdTest(file);
> }
>
>
>
>
> private static void runXPathDomTest(File file) {
> runTest(new DomCallable(file), "DOM");
> }
>
>
> private static void runXPathVtdTest(File file) {
> runTest(new VtdCallable(file), "VTD");
> }
>
> private static void runTest(Callable<String> callable, String name) {
> System.out.println();
> System.out.println("Start " + name);
> long startTime = System.nanoTime();
> try {
> for (int i = 0; i < 1000000; i++) {
> String output = callable.call();
> if (!"TestLevel3".equals(output)) {
> System.out.println("Failed: " + output);
> break;
> }
> }
> } catch (Exception exception) {
> System.out.println(exception);
> }
> long endTime = System.nanoTime();
> double difference = (endTime - startTime)/1e6;
> System.out.println("End " + name);
> System.out.println("Time Taken : " + difference);
> System.out.println();
> }
>
>
>
>
>
> private static class DomCallable implements Callable<String> {
>
> private final File fFile;
> private final Node fNode;
> private final XPath fXPath;
>
>
>
> private DomCallable(File file) {
> fFile = file;
> try {
> Document document =
> DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(file);
> fXPath = XPathFactory.newInstance().newXPath();
> XPathExpression expression =
> fXPath.compile(NODE_SELECTION_EXPRESSION);
> fNode = (Node)expression.evaluate(document,
> XPathConstants.NODE);
> } catch (ParserConfigurationException | SAXException |
> IOException | XPathExpressionException exception) {
> throw new RuntimeException(exception);
> }
> }
>
>
> @Override
> public String call() {
> try {
> XPathExpression expression =
> fXPath.compile(GET_NAME_EXPRESSION);
> return (String)expression.evaluate(fNode,
> XPathConstants.STRING);
> } catch (XPathExpressionException e) {
> throw new RuntimeException(e);
> }
> }
>
> }
>
>
>
> private static class VtdCallable implements Callable<String> {
>
> private final File fFile;
> private final AutoPilot fAutoPilot;
>
>
> private VtdCallable(File file) {
> fFile = file;
> VTDGen vg = new VTDGen();
> vg.parseFile(fFile.getAbsolutePath(), false);
> VTDNav vn = vg.getNav();
> fAutoPilot = new AutoPilot(vn);
> try {
> fAutoPilot.selectElement(NODE_SELECTION_EXPRESSION);
> fAutoPilot.iterate();
> } catch (NavException exception) {
> throw new RuntimeException(exception);
> }
> }
>
>
> @Override
> public String call() {
> try {
> fAutoPilot.selectXPath(GET_NAME_EXPRESSION);
> return fAutoPilot.evalXPathToString();
> } catch (XPathParseException e) {
> throw new RuntimeException(e);
> }
> }
>
> }
>
>
> }
>
>
> === END SOURCE CODE ===
>
>
|
|
From: <jz...@xi...> - 2013-08-22 23:38:00
|
Hi, The xml files you run tests are very very small. At those sizes,
the performance number you are getting from vtd-xml wll be dominated
by the performance of compile xpath expression, which is done by using
java cup and jflex, both externalpackages, so they are not good way
measure the performance of parsing and xpath evaluation... in reality,
those xpath compilations can be done once and reused many many times,
so even with some overhead, this can be easily optimized away
I am sure if you increase teh size of xml to a few k or MB in size,
or reuse xpath, you will see a dramatically improvement of
performance...
----- Original Message -----
From: Kalle Anka
To:
Cc:
Sent:Thu, 22 Aug 2013 15:46:50 +0100
Subject:[Vtd-xml-users] XPath evaluation 3x-4x slower than JDK with
DOM?
Hello,
I'm trying to evaluate the performance of vtd for my application
after perusing the benchmark results published on the main page.
However, I'm seeing quite a substantial difference in performance of
XPath evaluation between vtd and the standard DOM/JDK implementation.
My simple test evaluates a simple XPath expression ("name()") from
the context of a specific tag one million times in a row and these are
the results I am seeing (in ms):
Start DOMEnd DOMTime Taken : 3023.547643
Start VTDEnd VTDTime Taken : 10416.065461
My DOM implementation consistently outperforms the vtd 3x-4x. Am I
doing something wrong? I would be grateful for any feedback.
Note1: I've included the full code of my test at the end of this
e-mail. Note2: I've used the same XPath expression in each iteration
for testing purposes only, in reality there will be 1000's of
different expressions.
Note3: I'm using Java 7 [1]
import com.ximpleware.NavException; [2]import com.ximpleware.VTDGen;
[3]import com.ximpleware.VTDNav; [4]import
com.ximpleware.XPathParseException; [5]
import java.io.File; [6] import java.io.IOException; [7]import
java.util.concurrent.Callable; [8]import
javax.xml.parsers.DocumentBuilderFactory; [9]import
javax.xmlparsers.ParserConfigurationException; [10]import
javax.xml.xpath.XPath; [11] import javax.xml.xpath.XPathConstants;
[12]import javax.xml.xpath.XPathExpression; [13]import
javax.xml.xpath.XPathExpressionException; [14]import
javax.xml.xpath.XPathFactory; [15]
import org.w3c.dom.Document; [16]import org.w3c.dom.Node; [17]import
org.xml.sax.SAXException; [18]
public class XPathTest {
private static final String NODE_SELECTION_EXPRESSION =
"//TestLevel3"; private static final String GET_NAME_EXPRESSION
= "name()";
private XPathTest() {}
public static void main(String[] args) { File file
= new File("xpath_test.xml"); [19] runXPathDomTest(file);
runXPathVtdTest(file); }
private static void runXPathDomTest(File file) {
runTest(new DomCallable(file), "DOM"); }
private static void runXPathVtdTest(File file) {
runTest(new VtdCallable(file), "VTD"); }
private static void runTest(Callable callable, String name) {
System.out.println(); [20]
System.out.println("Start [21] " + name); long startTime =
System.nanoTime(); [22] try { for (int i =
0; i < 1000000; i++) { String output =
callable.call(); [23] if
(!"TestLevel3".equals(output)) {
System.out.println("Failed: [24] " + output);
break; } } }
catch (Exception exception) {
System.out.println(exception); [25] } long
endTime = System.nanoTime(); [26] double difference =
(endTime - startTime)/1e6; System.out.println("End [27]
" + name); System.out.println("Time [28] Taken : " +
difference); System.out.println(); [29] }
private static class DomCallable implements Callable {
private final File fFile; private final Node
fNode; private final XPath fXPath;
private DomCallable(File file) { fFile =
file; try { Document document
=
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(file);
[30] fXPath =
XPathFactory.newInstance().newXPath(); [31]
XPathExpression expression =
fXPath.compile(NODE_SELECTION_EXPRESSION); [32]
fNode = (Node)expression.evaluate(document [33], XPathConstants.NODE);
[34] } catch (ParserConfigurationException |
SAXException | IOException | XPathExpressionException exception) {
throw new RuntimeException(exception);
} }
@Override public String call() {
try { XPathExpression expression =
fXPath.compile(GET_NAME_EXPRESSION); [35]
return (String)expression.evaluate(fNode [36], XPathConstants.STRING);
[37] } catch (XPathExpressionException e) {
throw new RuntimeException(e); }
}
}
private static class VtdCallable implements Callable {
private final File fFile; private final
AutoPilot fAutoPilot;
private VtdCallable(File file) { fFile =
file; VTDGen vg = new VTDGen();
vg.parseFile(fFile.getAbsolutePath() [38], false);
VTDNav vn = vg.getNav(); [39] fAutoPilot = new
AutoPilot(vn); try {
fAutoPilot.selectElement(NODE_SELECTION_EXPRESSION); [40]
fAutoPilot.iterate(); [41] } catch
(NavException exception) { throw new
RuntimeException(exception); } }
@Override public String call() {
try {
fAutoPilot.selectXPath(GET_NAME_EXPRESSION); [42]
return fAutoPilot.evalXPathToString(); [43] }
catch (XPathParseException e) { throw new
RuntimeException(e); } }
}
}
=== END SOURCE CODE ===
Links:
------
[1] http://sitemail.hostway.com/http:
[2] http://sitemail.hostway.com/http:
[3] http://sitemail.hostway.com/http:
[4] http://sitemail.hostway.com/http:
[5] http://sitemail.hostway.com/http:
[6] http://sitemail.hostway.com/http:
[7] http://sitemail.hostway.com/http:
[8] http://sitemail.hostway.com/http:
[9] http://sitemail.hostway.com/http:
[10] http://sitemail.hostway.com/http:
[11] http://sitemail.hostway.com/http:
[12] http://sitemail.hostway.com/http:
[13] http://sitemail.hostway.com/http:
[14] http://sitemail.hostway.com/http:
[15] http://sitemail.hostway.com/http:
[16] http://sitemail.hostway.com/http:
[17] http://sitemail.hostway.com/http:
[18] http://sitemail.hostway.com/http:
[19] http://test.xml
[20] http://sitemail.hostway.com/http:
[21] http://sitemail.hostway.com/http:
[22] http://sitemail.hostway.com/http:
[23] http://sitemail.hostway.com/http:
[24] http://sitemail.hostway.com/http:
[25] http://sitemail.hostway.com/http:
[26] http://sitemail.hostway.com/http:
[27] http://sitemail.hostway.com/http:
[28] http://sitemail.hostway.com/http:
[29] http://sitemail.hostway.com/http:
[30] http://sitemail.hostway.com/http:
[31] http://sitemail.hostway.com/http:
[32] http://sitemail.hostway.com/http:
[33] http://sitemail.hostway.com/http:
[34] http://sitemail.hostway.com/http:
[35] http://sitemail.hostway.com/http:
[36] http://sitemail.hostway.com/http:
[37] http://sitemail.hostway.com/http:
[38] http://sitemail.hostway.com/http:
[39] http://sitemail.hostway.com/http:
[40] http://sitemail.hostway.com/http:
[41] http://sitemail.hostway.com/http:
[42] http://sitemail.hostway.com/http:
[43] http://sitemail.hostway.com/http:
|
|
From: Kalle A. <kal...@gm...> - 2013-08-22 14:46:57
|
Hello,
I'm trying to evaluate the performance of vtd for my application after
perusing the benchmark results published on the main page. However, I'm
seeing quite a substantial difference in performance of XPath evaluation
between vtd and the standard DOM/JDK implementation.
My simple test evaluates a simple XPath expression ("name()") from the
context of a specific tag one million times in a row and these are the
results I am seeing (in ms):
Start DOM
End DOM
Time Taken : 3023.547643
Start VTD
End VTD
Time Taken : 10416.065461
My DOM implementation consistently outperforms the vtd 3x-4x. Am I doing
something wrong? I would be grateful for any feedback.
Note1: I've included the full code of my test at the end of this e-mail.
Note2: I've used the same XPath expression in each iteration for testing
purposes only, in reality there will be 1000's of different expressions.
Note3: I'm using Java 7 & VTD-XML version 2.11
Thanks,
/Kalle
=== BEGIN TEST XML FILE ===
<?xml version="1.0" encoding="utf-8"?>
<TestLevel1>
<TestLevel2>
<TestLevel3 attr="test"></TestLevel3>
</TestLevel2>
</TestLevel1>
=== END TEST XML FILE ===
=== BEGIN SOURCE CODE ===
import com.ximpleware.AutoPilot;
import com.ximpleware.NavException;
import com.ximpleware.VTDGen;
import com.ximpleware.VTDNav;
import com.ximpleware.XPathParseException;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.Callable;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;
public class XPathTest {
private static final String NODE_SELECTION_EXPRESSION = "//TestLevel3";
private static final String GET_NAME_EXPRESSION = "name()";
private XPathTest() {}
public static void main(String[] args) {
File file = new File("xpath_test.xml");
runXPathDomTest(file);
runXPathVtdTest(file);
}
private static void runXPathDomTest(File file) {
runTest(new DomCallable(file), "DOM");
}
private static void runXPathVtdTest(File file) {
runTest(new VtdCallable(file), "VTD");
}
private static void runTest(Callable<String> callable, String name) {
System.out.println();
System.out.println("Start " + name);
long startTime = System.nanoTime();
try {
for (int i = 0; i < 1000000; i++) {
String output = callable.call();
if (!"TestLevel3".equals(output)) {
System.out.println("Failed: " + output);
break;
}
}
} catch (Exception exception) {
System.out.println(exception);
}
long endTime = System.nanoTime();
double difference = (endTime - startTime)/1e6;
System.out.println("End " + name);
System.out.println("Time Taken : " + difference);
System.out.println();
}
private static class DomCallable implements Callable<String> {
private final File fFile;
private final Node fNode;
private final XPath fXPath;
private DomCallable(File file) {
fFile = file;
try {
Document document =
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(file);
fXPath = XPathFactory.newInstance().newXPath();
XPathExpression expression =
fXPath.compile(NODE_SELECTION_EXPRESSION);
fNode = (Node)expression.evaluate(document,
XPathConstants.NODE);
} catch (ParserConfigurationException | SAXException |
IOException | XPathExpressionException exception) {
throw new RuntimeException(exception);
}
}
@Override
public String call() {
try {
XPathExpression expression =
fXPath.compile(GET_NAME_EXPRESSION);
return (String)expression.evaluate(fNode,
XPathConstants.STRING);
} catch (XPathExpressionException e) {
throw new RuntimeException(e);
}
}
}
private static class VtdCallable implements Callable<String> {
private final File fFile;
private final AutoPilot fAutoPilot;
private VtdCallable(File file) {
fFile = file;
VTDGen vg = new VTDGen();
vg.parseFile(fFile.getAbsolutePath(), false);
VTDNav vn = vg.getNav();
fAutoPilot = new AutoPilot(vn);
try {
fAutoPilot.selectElement(NODE_SELECTION_EXPRESSION);
fAutoPilot.iterate();
} catch (NavException exception) {
throw new RuntimeException(exception);
}
}
@Override
public String call() {
try {
fAutoPilot.selectXPath(GET_NAME_EXPRESSION);
return fAutoPilot.evalXPathToString();
} catch (XPathParseException e) {
throw new RuntimeException(e);
}
}
}
}
=== END SOURCE CODE ===
|
|
From: <jz...@xi...> - 2013-08-22 01:04:03
|
Ok, will do ----- Original Message ----- From: Erik Fäßler To:"jz...@xi..." Cc:"mic...@th..." , "vtd...@li..." Sent:Wed, 21 Aug 2013 22:03:21 +0200 Subject:Re: [Vtd-xml-users] Xpath 2.0 function list? This list would do greatly on the FAQ page. I will probably be interested in this list too, sooner or later. It would me great to have it documented. Best, Erik Am 21.08.2013 um 20:54 schrieb jz...@xi... [1]: vtd-xml supports ends-with, contains and starts-with, I have to dig a bit further to get to the full list ----- Original Message ----- From: To: Cc: Sent:Wed, 21 Aug 2013 18:28:54 +0000 Subject:[Vtd-xml-users] Xpath 2.0 function list? Found this in the FAQ: VTD-XML fully conforms with W3C XPath 1.0 recommendation. It supports all the built-in functions. It also supports many XPath 2.0 functions. Where can I find the list of XPath 2.0 functions that are supported ? Specifically interested in ends-with(). Thanks, Mike ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk [4]_______________________________________________ Vtd-xml-users mailing list Vtd...@li... [5] https://lists.sourceforge.net/lists/listinfo/vtd-xml-users [6] Links: ------ [1] mailto:jz...@xi... [2] mailto:mic...@th... [3] mailto:vtd...@li... [4] http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk [5] mailto:Vtd...@li... [6] https://lists.sourceforge.net/lists/listinfo/vtd-xml-users |
|
From: <mic...@th...> - 2013-08-21 20:54:42
|
Agreed and thanks for the quick answer. --Mike Date: Wednesday, August 21, 2013 4:03 PM Subject: Re: [Vtd-xml-users] Xpath 2.0 function list? This list would do greatly on the FAQ page. I will probably be interested in this list too, sooner or later. It would me great to have it documented. Best, Erik Am 21.08.2013 um 20:54 schrieb jz...@xi...<mailto:jz...@xi...>: vtd-xml supports ends-with, contains and starts-with, I have to dig a bit further to get to the full list ----- Original Message ----- From: <mic...@th...<mailto:mic...@th...>> To: <vtd...@li...<mailto:vtd...@li...>> Cc: Sent: Wed, 21 Aug 2013 18:28:54 +0000 Subject: [Vtd-xml-users] Xpath 2.0 function list? Found this in the FAQ: VTD-XML fully conforms with W3C XPath 1.0 recommendation. It supports all the built-in functions. It also supports many XPath 2.0 functions. Where can I find the list of XPath 2.0 functions that are supported ? Specifically interested in ends-with(). Thanks, Mike ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Vtd-xml-users mailing list Vtd...@li...<mailto:Vtd...@li...> https://lists.sourceforge.net/lists/listinfo/vtd-xml-users |
|
From: Erik F. <eri...@un...> - 2013-08-21 20:03:56
|
This list would do greatly on the FAQ page. I will probably be interested in this list too, sooner or later. It would me great to have it documented. Best, Erik Am 21.08.2013 um 20:54 schrieb jz...@xi...: > vtd-xml supports ends-with, contains and starts-with, I have to dig a bit further to get to the full list > > > > ----- Original Message ----- > From: > <mic...@th...> > > To: > <vtd...@li...> > Cc: > > Sent: > Wed, 21 Aug 2013 18:28:54 +0000 > Subject: > [Vtd-xml-users] Xpath 2.0 function list? > > > Found this in the FAQ: > VTD-XML fully conforms with W3C XPath 1.0 recommendation. It supports all the built-in functions. It also supports many XPath 2.0 functions. > > Where can I find the list of XPath 2.0 functions that are supported ? Specifically interested in ends-with(). > > Thanks, > Mike > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > Vtd-xml-users mailing list > Vtd...@li... > https://lists.sourceforge.net/lists/listinfo/vtd-xml-users |
|
From: <jz...@xi...> - 2013-08-21 18:54:38
|
vtd-xml supports ends-with, contains and starts-with, I have to dig a bit further to get to the full list ----- Original Message ----- From: To: Cc: Sent:Wed, 21 Aug 2013 18:28:54 +0000 Subject:[Vtd-xml-users] Xpath 2.0 function list? Found this in the FAQ: VTD-XML fully conforms with W3C XPath 1.0 recommendation. It supports all the built-in functions. It also supports many XPath 2.0 functions. Where can I find the list of XPath 2.0 functions that are supported ? Specifically interested in ends-with(). Thanks, Mike |
|
From: <mic...@th...> - 2013-08-21 18:29:02
|
Found this in the FAQ: VTD-XML fully conforms with W3C XPath 1.0 recommendation. It supports all the built-in functions. It also supports many XPath 2.0 functions. Where can I find the list of XPath 2.0 functions that are supported ? Specifically interested in ends-with(). Thanks, Mike |
|
From: <jz...@xi...> - 2013-08-16 16:28:33
|
VTD-xml extended is a bit behind, there is plan to bring it up to date with standard version, so no reason exists that prevent vtdNavHuge from having that method or many other methods ----- Original Message ----- From: "florian kammermann" To: Cc: Sent:Fri, 16 Aug 2013 09:42:51 +0200 Subject:[Vtd-xml-users] VTDNavHuge and toNormalizedString2 Is there any reason why VTDNavHuge don’t have the method toNormalizedString2? Freundliche Grüsse Florian Kammermann ITPEARLS AG Wankdorf | Center Papiermühlestrasse 73 CH - 3014 Bern Tel: +41 31 561 61 10 Fax: +41 31 561 61 17 flo...@it... www.itpearls.com [1] Kennen Sie bereits unser BPM Knowledge Center? [2] Links: ------ [1] http://www.itpearls.com/ [2] http://www.itpearls.com/2011/11/bpm-schulungen/ |
|
From: <jz...@xi...> - 2013-08-12 20:04:03
|
Try to use standard vtd-xml when ever you can since it is full featured...use extended vtd-xml to process document whenever file size exceeds 2GB...you need some glue code that reads xml file out of inputstream and into an in-memory buffer ----- Original Message ----- From: Riccardo Prandini To: Cc: Sent:Mon, 12 Aug 2013 12:02:27 +0200 Subject:[Vtd-xml-users] InputStream in VTD Hi, I'm using for the first time vtd, for my project, i have to deal vith large "file" I recive the file content as InputStream via other class, so i'm interested in two thing. - An efficent way to use the InputStreamIn the doc is suggested to dump to byteArray and use setDoc. But using this method I have 2 times the file in memory 1 byteArray and one VTD o am I wrong?. - If is planned the validation via xsd. ---Riccardo Prandini Please consider the environment before printing this email |
|
From: Riccardo P. <ric...@gm...> - 2013-08-12 11:16:54
|
Interesting solution to manage big files 2GB is my target.
I have opened the XMLMemMappedBuffer I'll do a patch to create it from
InputStream.
---Riccardo Prandini
Please consider the environment before printing this email
2013/8/12 Preeti Subramanian <sp...@se...>
> Hi Riccardo,
>
> I suggest you can use VTD extended. After that you can start your
> application using -Xmx option.
> Code snippet:
>
> XMLMemMappedBuffer xb = new XMLMemMappedBuffer();
> VTDGenHuge vg = new VTDGenHuge();
> xb.readFile("somefile.xml");
> vg.setDoc(xb);
> vg.parse(true);
> VTDNavHuge vn = vg.getNav();
>
> Came across this in VTD-XML FAQ...
>
> *"* What are the maximum file size supported by VTD-XML?
>
> For VTD-XML's regular version, it depends on the name space enablement.
>
> When namespace is not enabled, the maximum file size is 2 GB.
>
> When namespace is enabled, the maximum file size is 1 GB.
>
> With VTD-XML's extended edition, the supported maximum file size is 256
> GB, regardless of namespace support."*
>
> Regards
> Preeti
> SecPod Technologies
> (www.secpod.com)
> mail: sp...@se...
>
>
>
> On Monday 12 August 2013 03:32 PM, Riccardo Prandini wrote:
>
> Hi,
>
> I'm using for the first time vtd, for my project, i have to deal vith
> large "file".
> I recive the file content as InputStream via other class, so i'm
> interested in two thing.
>
> - An efficent way to use the InputStream
> In the doc is suggested to dump to byteArray and use setDoc. But using
> this method I have 2 times the file in memory 1 byteArray and one VTD o am
> I wrong?.
>
> - If is planned the validation via xsd.
>
>
>
>
> ---Riccardo Prandini
> Please consider the environment before printing this email
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Vtd-xml-users mailing lis...@li...://lists.sourceforge.net/lists/listinfo/vtd-xml-users
>
>
>
|
|
From: Preeti S. <sp...@se...> - 2013-08-12 10:40:22
|
Hi Riccardo,
I suggest you can use VTD extended. After that you can start your
application using -Xmx option.
Code snippet:
| XMLMemMappedBuffer xb= new XMLMemMappedBuffer();
VTDGenHuge vg= new VTDGenHuge();
xb.readFile("somefile.xml");
vg.setDoc(xb);
vg.parse(true);
VTDNavHuge vn= vg.getNav();|
Came across this in VTD-XML FAQ...
/"* What are the maximum file size supported by VTD-XML?
For VTD-XML's regular version, it depends on the name space enablement.
When namespace is not enabled, the maximum file size is 2 GB.
When namespace is enabled, the maximum file size is 1 GB.
With VTD-XML's extended edition, the supported maximum file size is 256
GB, regardless of namespace support."/
Regards
Preeti
SecPod Technologies
(www.secpod.com)
mail: sp...@se...
On Monday 12 August 2013 03:32 PM, Riccardo Prandini wrote:
> Hi,
>
> I'm using for the first time vtd, for my project, i have to deal vith
> large "file".
> I recive the file content as InputStream via other class, so i'm
> interested in two thing.
>
> - An efficent way to use the InputStream
> In the doc is suggested to dump to byteArray and use setDoc. But using
> this method I have 2 times the file in memory 1 byteArray and one VTD
> o am I wrong?.
>
> - If is planned the validation via xsd.
>
>
>
>
> ---Riccardo Prandini
> Please consider the environment before printing this email
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>
>
> _______________________________________________
> Vtd-xml-users mailing list
> Vtd...@li...
> https://lists.sourceforge.net/lists/listinfo/vtd-xml-users
|
|
From: Riccardo P. <ric...@gm...> - 2013-08-12 10:02:57
|
Hi, I'm using for the first time vtd, for my project, i have to deal vith large "file". I recive the file content as InputStream via other class, so i'm interested in two thing. - An efficent way to use the InputStream In the doc is suggested to dump to byteArray and use setDoc. But using this method I have 2 times the file in memory 1 byteArray and one VTD o am I wrong?. - If is planned the validation via xsd. ---Riccardo Prandini Please consider the environment before printing this email |