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: Olusola F. <olu...@gm...> - 2006-10-04 02:32:10
|
To install the VTD-XML jar (or any other external jar) into an eclipse project: 1. Right click on the project 2. select Build Path -> configure build path 3. click on "Add External Jars" button, locate the jar in your directory and click the "open" button 4. Click on "Ok" 5. Rebuild the entire project if it isn't done automatically. Unfortunately I can't remember the procedure for NetBeans Olusola On 02/10/06, lo...@ou... <lo...@ou...> wrote: > > Greetings All, > > I am new to using VTD-XML and it looks like it will be just what I need > for a class project that we are working on. > > Additionally, I have only a minimal Java background but am fairly > experienced with C/C++ & Fortran so I might ask a few stupid questions > while trying to get started. > > In particular, I have also been looking at Eclipse and NetBeans as an IDE > so that I can run some demos of the vtd-xml classes but cannot figure out > how to get things to run. > > I read a really good article on vtd-xml at: > > http://www.javaworld.com/javaworld/jw-03-2006/jw-0327-simplify_p.html > > and in particular at: > > http://www.devx.com/xml/Article/22219/1954?pf=true > > but am not sure how to go about getting these demos to run since I will be > adding them to an applet loader from JavaView in a project that will read > some <XML> code being generated by another application that we have. > > http://www.javaview.de/vgp/tutor/loader/PaLoader.html > > I would greatly appreciate any help that someone might be able to give me > in trying to get "devx.com" demo above to work. > > Thanks and have a good day, > Lonnie C. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Vtd-xml-users mailing list > Vtd...@li... > https://lists.sourceforge.net/lists/listinfo/vtd-xml-users > |
From: Mark S. <ma...@Sc...> - 2006-10-04 02:12:13
|
Tatu Saloranta wrote: > > Ok. It is likely it accepts all codes <= 0x0020 as > white space -- that's usually pretty reasonable > way to do it with string tokenization. Excellent suggestion. Jimmy, would that be something you would consider doing in the near future with vtd (as an option)? <snip> > One more thing -- xml 1.1 actually does allow these > control characters (although not null byte) to be > included, via character entities. It's too bad, then, > that xml 1.1 has other problems that make it DOA, > rarely used anywhere (you can google for various > people's reasoning why xml 1.1 sucks -- I have my > own pet peeves -- byt I did work on making Woodstox > parser support xml 1.1 nonetheless). Interesting. (I use and recommend Woodstox (with XFire atm), btw) > Of course, since you don't control the generation of > input files this is bit of a moot point. ;-) :-) -- http://www.ScheduleWorld.com/tg/ Free Google Calendar synchronization with Outlook, Evolution, cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird, Pocket PC/Windows Mobile. Also sync tasks, notes and contacts! WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support. -- http://www.ScheduleWorld.com/tg/ Free Google Calendar synchronization with Outlook, Evolution, cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird, Pocket PC/Windows Mobile. Also sync tasks, notes and contacts! WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support. |
From: Tatu S. <cow...@ya...> - 2006-10-03 23:42:14
|
--- Mark Swanson <ma...@Sc...> wrote: > Tatu Saloranta wrote: ... > > Really? I wouldn't have though xpp would do that, > > since > > I thought it aims to be an actual xml conformant > > parser... > > > > What kind of scrubbing does it do? > > I haven't tested it exhaustively, but I do know that > it silently ignores > 0x0c (form feed) because this is where I noticed my > old code parsed some > XML properly (contained 0x0c) and my replacement > code based on vtd failed. Ok. It is likely it accepts all codes <= 0x0020 as white space -- that's usually pretty reasonable way to do it with string tokenization. ... > > Which industries rely on broken xml content being > > processed? (an honest question, no sarcasm > intended) > > It wasn't that long ago that some systems used these > control characters > and some devices/software are still using them. Some > financial systems I > work with today still use FS/GS/STX/ETX, and the > 0x0c data is coming > directly from Outlook MAPI data (event > descriptions). I'm not sure > exactly how someone is copy/pasting 0x0c characters ... > The problem is real; it's ugly, and I hope VTD will Ok, gotcha. Now that you describe it, I think I understand it bit better. And in fact this is part of a more general problem of how to transfer binary data with(in) xml. Control characters are the most obvious problem, but not the only ones. There are other illegal xml characters that would likewise cause problems... the most commonly used (but not optimal obviously) solution is to use something like base64. One more thing -- xml 1.1 actually does allow these control characters (although not null byte) to be included, via character entities. It's too bad, then, that xml 1.1 has other problems that make it DOA, rarely used anywhere (you can google for various people's reasoning why xml 1.1 sucks -- I have my own pet peeves -- byt I did work on making Woodstox parser support xml 1.1 nonetheless). Of course, since you don't control the generation of input files this is bit of a moot point. ;-) -+ Tatu +- __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Jimmy Z. <cra...@co...> - 2006-10-03 17:32:53
|
Mark, I will keep your suggestion in mind and see what can be done to accommodate it in the future... Jimmy ----- Original Message ----- From: "Mark Swanson" <ma...@Sc...> To: "Tatu Saloranta" <cow...@ya...> Cc: <vtd...@li...> Sent: Monday, October 02, 2006 10:14 PM Subject: Re: [Vtd-xml-users] 1.6 bug: > Tatu Saloranta wrote: >> --- Mark Swanson <ma...@Sc...> wrote: >> >> ... >>> Well, allow me try to make a stronger case: >>> >>> In the real world, data isn't perfect. One can >>> either toss back illegal >>> data or try your best to work with it. A common best >>> practice is to be >>> as friendly and as considerate as you can to the >>> incoming data, and >>> produce the most accurate and conforming (to >>> whatever standard) outgoing >>> data. >> >> This is common practice for some applications ("be >> conservative at what you send, liberal at what you >> accept"), but notably not with xml processing. > > I think the need for it is greatly diminished, but that's as far as I'll > go. > > <snip> >> Having said that, I would think that if specific >> lenient modes could be enabled (and were disabled >> by default), that might be reasonable. > > Cool. > >> ... >>> 4. (at least some of) VTDs competitors already scrub >>> the data by >>> default. The XPP (Xml Pull Parser) already does >>> this. In fact, I was in >>> the middle of switching away from XPP when I ran >>> into this VTD >>> limitation. For my particular use case, using VTD is >>> now slower than XPP >>> because of this scrubbing issue. >> >> Really? I wouldn't have though xpp would do that, >> since >> I thought it aims to be an actual xml conformant >> parser... >> >> What kind of scrubbing does it do? > > I haven't tested it exhaustively, but I do know that it silently ignores > 0x0c (form feed) because this is where I noticed my old code parsed some > XML properly (contained 0x0c) and my replacement code based on vtd failed. > > >>> A single if{} could allow the pedantic behaviour (as >>> it is currently) or >>> a more friendly and considerate (I would argue more >>> industry standard) >>> behaviour. >> >> Which industries rely on broken xml content being >> processed? (an honest question, no sarcasm intended) > > It wasn't that long ago that some systems used these control characters > and some devices/software are still using them. Some financial systems I > work with today still use FS/GS/STX/ETX, and the 0x0c data is coming > directly from Outlook MAPI data (event descriptions). I'm not sure > exactly how someone is copy/pasting 0x0c characters into the Outlook > description field, but it happened yesterday/today. Also, cell phones > that I work with (I support any SyncML-capable cell phone ever made) > wrap data inside XML (SyncML is an XML protocol). All sorts of control > characters wind up in the XML that have been taken care of through other > scrubbers. I wish I didn't have to do that for the reasons mentioned. > > The problem is real; it's ugly, and I hope VTD will add this optional > feature to help developers deal with it. > > Thanks for listening. > > Cheers. > > -- > http://www.ScheduleWorld.com/tg/ > Free Google Calendar synchronization with Outlook, Evolution, > cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird, > Pocket PC/Windows Mobile. Also sync tasks, notes and contacts! > WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Vtd-xml-users mailing list > Vtd...@li... > https://lists.sourceforge.net/lists/listinfo/vtd-xml-users |
From: Mark S. <ma...@Sc...> - 2006-10-03 05:14:09
|
Tatu Saloranta wrote: > --- Mark Swanson <ma...@Sc...> wrote: > > ... >> Well, allow me try to make a stronger case: >> >> In the real world, data isn't perfect. One can >> either toss back illegal >> data or try your best to work with it. A common best >> practice is to be >> as friendly and as considerate as you can to the >> incoming data, and >> produce the most accurate and conforming (to >> whatever standard) outgoing >> data. > > This is common practice for some applications ("be > conservative at what you send, liberal at what you > accept"), but notably not with xml processing. I think the need for it is greatly diminished, but that's as far as I'll go. <snip> > Having said that, I would think that if specific > lenient modes could be enabled (and were disabled > by default), that might be reasonable. Cool. > ... >> 4. (at least some of) VTDs competitors already scrub >> the data by >> default. The XPP (Xml Pull Parser) already does >> this. In fact, I was in >> the middle of switching away from XPP when I ran >> into this VTD >> limitation. For my particular use case, using VTD is >> now slower than XPP >> because of this scrubbing issue. > > Really? I wouldn't have though xpp would do that, > since > I thought it aims to be an actual xml conformant > parser... > > What kind of scrubbing does it do? I haven't tested it exhaustively, but I do know that it silently ignores 0x0c (form feed) because this is where I noticed my old code parsed some XML properly (contained 0x0c) and my replacement code based on vtd failed. >> A single if{} could allow the pedantic behaviour (as >> it is currently) or >> a more friendly and considerate (I would argue more >> industry standard) >> behaviour. > > Which industries rely on broken xml content being > processed? (an honest question, no sarcasm intended) It wasn't that long ago that some systems used these control characters and some devices/software are still using them. Some financial systems I work with today still use FS/GS/STX/ETX, and the 0x0c data is coming directly from Outlook MAPI data (event descriptions). I'm not sure exactly how someone is copy/pasting 0x0c characters into the Outlook description field, but it happened yesterday/today. Also, cell phones that I work with (I support any SyncML-capable cell phone ever made) wrap data inside XML (SyncML is an XML protocol). All sorts of control characters wind up in the XML that have been taken care of through other scrubbers. I wish I didn't have to do that for the reasons mentioned. The problem is real; it's ugly, and I hope VTD will add this optional feature to help developers deal with it. Thanks for listening. Cheers. -- http://www.ScheduleWorld.com/tg/ Free Google Calendar synchronization with Outlook, Evolution, cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird, Pocket PC/Windows Mobile. Also sync tasks, notes and contacts! WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support. |
From: Tatu S. <cow...@ya...> - 2006-10-03 04:06:30
|
--- Mark Swanson <ma...@Sc...> wrote: ... > Well, allow me try to make a stronger case: > > In the real world, data isn't perfect. One can > either toss back illegal > data or try your best to work with it. A common best > practice is to be > as friendly and as considerate as you can to the > incoming data, and > produce the most accurate and conforming (to > whatever standard) outgoing > data. This is common practice for some applications ("be conservative at what you send, liberal at what you accept"), but notably not with xml processing. > Currently, VTD fails here wrt the incoming data; > there is no way I can > tell VTD to be considerate and lenient towards the > failings of the > incoming data stream. As a developer, I believe it > is my choice - not > VTD's - whether or not I wish to be considerate and > lenient to the > incoming data. If I wish to consider a form feed You could argue this, but it is worth noting that none of the actual conformant xml parsers allow things like characters that are _illegal_ in xml content: try same content with, say, Xerces, and see what I mean. This is because xml specification is very clear not only on what is considered legal for well-formed documents, but also how conformining processing applications (parsers) are to deal with things that are not. Specifically they are not allowed to resolve fatal problems, and must report these fatal errors to the end application. Having said that, I would think that if specific lenient modes could be enabled (and were disabled by default), that might be reasonable. ... > 4. (at least some of) VTDs competitors already scrub > the data by > default. The XPP (Xml Pull Parser) already does > this. In fact, I was in > the middle of switching away from XPP when I ran > into this VTD > limitation. For my particular use case, using VTD is > now slower than XPP > because of this scrubbing issue. Really? I wouldn't have though xpp would do that, since I thought it aims to be an actual xml conformant parser... What kind of scrubbing does it do? > A single if{} could allow the pedantic behaviour (as > it is currently) or > a more friendly and considerate (I would argue more > industry standard) > behaviour. Which industries rely on broken xml content being processed? (an honest question, no sarcasm intended) -+ Tatu +- __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Mark S. <ma...@Sc...> - 2006-10-03 01:48:19
|
Jimmy Zhang wrote: > A concern, if VTD-XML is to allow those chars, is that XML developers > are likely to > shun away from VTD-XML for the fear that it is not enough conformant to > the spec... > It is something that is worth thinking about... Well, allow me try to make a stronger case: In the real world, data isn't perfect. One can either toss back illegal data or try your best to work with it. A common best practice is to be as friendly and as considerate as you can to the incoming data, and produce the most accurate and conforming (to whatever standard) outgoing data. Currently, VTD fails here wrt the incoming data; there is no way I can tell VTD to be considerate and lenient towards the failings of the incoming data stream. As a developer, I believe it is my choice - not VTD's - whether or not I wish to be considerate and lenient to the incoming data. If I wish to consider a form feed character as harmless, then I don't want my tools to get in the way. VTD is getting in the way. From a performance standpoint, VTD is now causing many negative consequences: 1. I must build and maintain a new additional layer to handle incoming requests - because I don't have the source to modify any of the previous layers. This new layer is required to scrub clean the incoming data - a job that VTD could have done far faster and cheaper both in terms of time and resources. 2. I need to allocate more objects to buffer the incoming data and the new cleaned result, and spend CPU time walking and cleaning the incoming data. VTD is already doing this exact same job, it's just missing a small insignificant extra if() statement. 3. The extra cost of memory and CPU (plus garbage collection) forced upon users of VTD (users who want to be considerate and friendly to clients sending in data) may now remove the advantages of VTD compared to other solutions. 4. (at least some of) VTDs competitors already scrub the data by default. The XPP (Xml Pull Parser) already does this. In fact, I was in the middle of switching away from XPP when I ran into this VTD limitation. For my particular use case, using VTD is now slower than XPP because of this scrubbing issue. A single if{} could allow the pedantic behaviour (as it is currently) or a more friendly and considerate (I would argue more industry standard) behaviour. In the real world, dirty data happens. We have to deal with it. VTDs value would be even greater if developers could count on it to help us with this problem. Please consider it. Thank you. -- http://www.ScheduleWorld.com/tg/ Free Google Calendar synchronization with Outlook, Evolution, cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird, Pocket PC/Windows Mobile. Also sync tasks, notes and contacts! WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support. |
From: Jimmy Z. <cra...@co...> - 2006-10-02 22:40:31
|
A concern, if VTD-XML is to allow those chars, is that XML developers are likely to shun away from VTD-XML for the fear that it is not enough conformant to the spec... It is something that is worth thinking about... ----- Original Message ----- From: "Mark Swanson" <ma...@Sc...> To: <vtd...@li...> Sent: Monday, October 02, 2006 1:59 PM Subject: Re: [Vtd-xml-users] 1.6 bug: > Jimmy Zhang wrote: >> Is ^L a valid XML character? What is its value in the UCS? >> Does Xerces have problem with this char?? > > Yeah, I can see I wasn't clear; I did look up ^L and didn't find > anything so was hoping you would just know :-) > > Ok, I used hexdump and found the value of the offending character: 0x0C > Form Feed. > This is not a valid xml character. Valid characters are 0x0a, 0x0d, 0x09 > below 0x20, and 0x20 and up: > http://www.w3.org/TR/REC-xml/#charsets > > However, I now have to create a method called removeAsciiControl() that > removes every byte < 0x20 except for 0x0d, 0x0a, 0x09. Only then can I > pass this cleaned up data to vtd. > > I'd like to avoid this overhead, and it would be ideal if vtd just > ignored non-valid xml characters. This saves me from creating a buffer > and cleaning the data manually. > > Thank you. > > -- > http://www.ScheduleWorld.com/tg/ > Free Google Calendar synchronization with Outlook, Evolution, > cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird, > Pocket PC/Windows Mobile. Also sync tasks, notes and contacts! > WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Vtd-xml-users mailing list > Vtd...@li... > https://lists.sourceforge.net/lists/listinfo/vtd-xml-users > |
From: Mark S. <ma...@Sc...> - 2006-10-02 20:59:02
|
Jimmy Zhang wrote: > Is ^L a valid XML character? What is its value in the UCS? > Does Xerces have problem with this char?? Yeah, I can see I wasn't clear; I did look up ^L and didn't find anything so was hoping you would just know :-) Ok, I used hexdump and found the value of the offending character: 0x0C Form Feed. This is not a valid xml character. Valid characters are 0x0a, 0x0d, 0x09 below 0x20, and 0x20 and up: http://www.w3.org/TR/REC-xml/#charsets However, I now have to create a method called removeAsciiControl() that removes every byte < 0x20 except for 0x0d, 0x0a, 0x09. Only then can I pass this cleaned up data to vtd. I'd like to avoid this overhead, and it would be ideal if vtd just ignored non-valid xml characters. This saves me from creating a buffer and cleaning the data manually. Thank you. -- http://www.ScheduleWorld.com/tg/ Free Google Calendar synchronization with Outlook, Evolution, cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird, Pocket PC/Windows Mobile. Also sync tasks, notes and contacts! WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support. |
From: Jimmy Z. <cra...@co...> - 2006-10-02 20:47:42
|
Are you just trying to get a demo? There is one at XimpleWare's web site http://vtd-xml.sf.net/demo/demo1.html if you just want to get the source code to the demo applet, there is one that can be emailed to you ... will this help? ----- Original Message ----- From: <lo...@ou...> To: <vtd...@li...> Sent: Monday, October 02, 2006 10:12 AM Subject: [Vtd-xml-users] newbie question > Greetings All, > > I am new to using VTD-XML and it looks like it will be just what I need > for a class project that we are working on. > > Additionally, I have only a minimal Java background but am fairly > experienced with C/C++ & Fortran so I might ask a few stupid questions > while trying to get started. > > In particular, I have also been looking at Eclipse and NetBeans as an IDE > so that I can run some demos of the vtd-xml classes but cannot figure out > how to get things to run. > > I read a really good article on vtd-xml at: > > http://www.javaworld.com/javaworld/jw-03-2006/jw-0327-simplify_p.html > > and in particular at: > > http://www.devx.com/xml/Article/22219/1954?pf=true > > but am not sure how to go about getting these demos to run since I will be > adding them to an applet loader from JavaView in a project that will read > some <XML> code being generated by another application that we have. > > http://www.javaview.de/vgp/tutor/loader/PaLoader.html > > I would greatly appreciate any help that someone might be able to give me > in trying to get "devx.com" demo above to work. > > Thanks and have a good day, > Lonnie C. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Vtd-xml-users mailing list > Vtd...@li... > https://lists.sourceforge.net/lists/listinfo/vtd-xml-users > |
From: Jimmy Z. <cra...@co...> - 2006-10-02 20:30:17
|
Is ^L a valid XML character? What is its value in the UCS? Does Xerces have problem with this char?? ----- Original Message ----- From: "Mark Swanson" <ma...@Sc...> To: <vtd...@li...> Sent: Monday, October 02, 2006 12:49 PM Subject: [Vtd-xml-users] 1.6 bug: >I did a quick search and didn't find this so I'm reporting here: > > If VTD sees a control character like ^L it will throw an exception and > fail to parse the document. > > Please fix this to be more tolerant. At the very least allow me to > specify an option to tell vtd to ignore characters that would otherwise > cause parsing to stop. > > Thank you. > > -- > http://www.ScheduleWorld.com/tg/ > Free Google Calendar synchronization with Outlook, Evolution, > cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird, > Pocket PC/Windows Mobile. Also sync tasks, notes and contacts! > WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Vtd-xml-users mailing list > Vtd...@li... > https://lists.sourceforge.net/lists/listinfo/vtd-xml-users > |
From: Mark S. <ma...@Sc...> - 2006-10-02 19:49:49
|
I did a quick search and didn't find this so I'm reporting here: If VTD sees a control character like ^L it will throw an exception and fail to parse the document. Please fix this to be more tolerant. At the very least allow me to specify an option to tell vtd to ignore characters that would otherwise cause parsing to stop. Thank you. -- http://www.ScheduleWorld.com/tg/ Free Google Calendar synchronization with Outlook, Evolution, cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird, Pocket PC/Windows Mobile. Also sync tasks, notes and contacts! WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support. |
From: <lo...@ou...> - 2006-10-02 17:12:02
|
Greetings All, I am new to using VTD-XML and it looks like it will be just what I need for a class project that we are working on. Additionally, I have only a minimal Java background but am fairly experienced with C/C++ & Fortran so I might ask a few stupid questions while trying to get started. In particular, I have also been looking at Eclipse and NetBeans as an IDE so that I can run some demos of the vtd-xml classes but cannot figure out how to get things to run. I read a really good article on vtd-xml at: http://www.javaworld.com/javaworld/jw-03-2006/jw-0327-simplify_p.html and in particular at: http://www.devx.com/xml/Article/22219/1954?pf=true but am not sure how to go about getting these demos to run since I will be adding them to an applet loader from JavaView in a project that will read some <XML> code being generated by another application that we have. http://www.javaview.de/vgp/tutor/loader/PaLoader.html I would greatly appreciate any help that someone might be able to give me in trying to get "devx.com" demo above to work. Thanks and have a good day, Lonnie C. |
From: Jimmy Z. <cra...@co...> - 2006-10-02 07:34:06
|
Olivia, There is a Xpath built-in function called "contains(String, stirng)" ... so the expression will become ap2.selectXPath("/CATALOG/CD[contains(TITLE ,'a')]"); We currently don't have this function implemented in version 1.6 yet. But 1.7 is likely ... Cheers, Jimmy ----- Original Message ----- From: <ol...@xt...> To: "Zhang" <jz...@xi...> Sent: Sunday, October 01, 2006 7:35 PM Subject: Using XPath > Hi Mr Zhang; > By looking at the following > ap2.selectXPath("/CATALOG/CD[TITLE=\"Sylvias Mother\"]"); > it is to match all the records with the TITLE "Sylvias Mother". > The question is, how we would write the above command or method be if we > were trying to find all the records that their TITLES contain or have for > example the letter "a" . > > Thank you > Olivia > |
From: angel f. <afi...@up...> - 2006-09-25 21:21:51
|
Hi Jimmy, =20 Thank for the information. I think the same way, that VTD-XML need = the capability to do XML composition. In that way it will be rounded as a = good product, from composition to parser to update xml. =20 Today I am using the JDOM for java for doing the composition part. =20 Regards, Angel Figueroa =20 =20 -----Original Message----- From: Jimmy Zhang [mailto:jz...@xi...]=20 Sent: Monday, September 25, 2006 1:20 PM To: angel figueroa Cc: vtd...@li... Subject: Re: XML question. =20 Interesting that this questions has been asked by a few people now... VTD-XML is designed to be a parser, so it assumes there is an input = document in XmL format as the starting point... to compose a document, you can either use = string concatenation or use genx http://www.tbray.org/ongoing/When/200x/2004/02/20/GenxStatus = (written in C)... It seems=20 that VTD-XML needs to incorporate more functions down the road, such as = the composition=20 capability you mentioned... Also feel free to join vTD-xml's user discussion group @ https://lists.sourceforge.net/lists/listinfo/vtd-xml-users if there are more questions... Cheers, Jimmy ----- Original Message -----=20 From: angel <mailto:afi...@up...> figueroa=20 To: in...@xi...=20 Sent: Monday, September 25, 2006 9:48 AM Subject: XML question. =20 Hi, =20 Is a way that by using the VTD-XML, an xml Document be created? = Convert a raw data file to XML Document. Do you have method for add Element, Attribute, etc, etc.? =20 =20 =20 Regards, Angel Figueroa |
From: Jimmy Z. <jz...@xi...> - 2006-09-25 17:27:53
|
Interesting that this questions has been asked by a few people now... VTD-XML is designed to be a parser, so it assumes there is an input = document in XmL format as the starting point... to compose a document, you can either use = string concatenation or use genx http://www.tbray.org/ongoing/When/200x/2004/02/20/GenxStatus = (written in C)... It seems=20 that VTD-XML needs to incorporate more functions down the road, such as = the composition=20 capability you mentioned... Also feel free to join vTD-xml's user discussion group @ = https://lists.sourceforge.net/lists/listinfo/vtd-xml-users if there are more questions... Cheers, Jimmy ----- Original Message -----=20 From: angel figueroa=20 To: in...@xi...=20 Sent: Monday, September 25, 2006 9:48 AM Subject: XML question. Hi, Is a way that by using the VTD-XML, an xml Document be created? = Convert a raw data file to XML Document. Do you have method for add = Element, Attribute, etc, etc.? Regards, Angel Figueroa |
From: Jimmy Z. <cra...@co...> - 2006-09-15 17:37:28
|
Hi, I am wondering if anyone has to process very large XML files = (Multi-GBytes) in those case, would it be helpful for us to reshuffle the layout of VTD = records, or create extensions?? Cheers,=20 Jimmy Zhang |
From: Jimmy Z. <jz...@xi...> - 2006-09-10 23:38:31
|
Olivia, I think you didn't unzip it.. you have to unzip "ximpleWare_1.6.zip into a separate directory and set the classpath pointer pointing to the vtd-xml.zip file in that directory... by looking at "C:\VTD-XML\ximpleware_1.6.zip\ximpleware_1.6\vtd-xml.zip", it seems to me that you didn't really unzip the file.. Jimmy ----- Original Message ----- From: <ol...@xt...> To: <jz...@xi...> Sent: Sunday, September 10, 2006 3:26 PM Subject: Does com.ximpleware package exists > Hi Mr Zhang; > After I've fixed my classpath and made it the following, > .;C:\VTD-XML\ximpleware_1.6.zip\ximpleware_1.6\vtd-xml.zip > still the error com.ximplrware package does not exist, then I went to > java.sun.com website and I looked into Java.lang package and com was not > there, so the q > |
From: Jimmy Z. <cra...@co...> - 2006-09-05 18:26:07
|
Suppose the element has N attributes and the element's VTD index is i i =3D=3D> element i + 1 =3D=3D> attribute name i+2 =3D=3D=3D > attribute val i+3 =3D=3D=3D> attribute name i+4 =3D=3D=3D> attribute val .... i + 2N =3D=3D> attribute name i+2N+1 =3D=3D>attribute val.... so you can do something like that when using VTD-XML int i=3D vn.getCurrentIndex(); while(int j=3D0; j<vn.getAttrCount() ; j++){ System.out.println(" attr name --->"+ vn.toString(i+2j+1)); System.out.println(" attr val --->" + vn.toString(i+2j+2)); } ----- Original Message -----=20 From: Olusola Fadero=20 To: vtd...@li...=20 Sent: Tuesday, September 05, 2006 4:38 AM Subject: [Vtd-xml-users] Getting Attibutes names out of an element Hi ,=20 I've been looking at VTD-XML with interest . One thing I don't = understand is how do I get the names of attributes out of an element if = I don't know all the attribute names. In other Java API's there is a way = of getting a list of attributes for an element i.e. by using a Nodelist. Olusola -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your job = easier Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo = http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 -------------------------------------------------------------------------= ----- _______________________________________________ Vtd-xml-users mailing list Vtd...@li... https://lists.sourceforge.net/lists/listinfo/vtd-xml-users |
From: Tatu S. <cow...@ya...> - 2006-09-05 18:11:45
|
--- Olusola Fadero <olu...@gm...> wrote: > Hi , > I've been looking at VTD-XML with interest . One > thing I don't understand is > how do I get the names of attributes out of an > element if I don't know all > the attribute names. In other Java API's there is a > way of getting a list of > attributes for an element i.e. by using a Nodelist. As you may have noticed, VTD-XML is not object-oriented in that sense, and thus elements and attributes are not really bundled together. They are related, and relationship can be found... but there is no object-level containment: so there is no concept of "getting attributes out of an element", just finding attributes that follow start element/start tag. Another way to think about that is to note that attributes are tokens same way as tags themselves are, ie. granularity is higher than with other toolkits. Also, as a consequence, looking at other APIs will not give much insight into knowing how to get attribute names and values from VTD-XML: the API is quite distinct due to impl wanting to avoid object allocation cost at any cost. I don't have javadocs at hand, but it is not all that hard to figure it out from the samples. And I'm sure Jimmy can give a complete example of how to traverse over attribute names, if and when you do need to know them all (most of the time you don't -- you know what to look for). -+ Tatu +- __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Olusola F. <olu...@gm...> - 2006-09-05 11:38:56
|
Hi , I've been looking at VTD-XML with interest . One thing I don't understand is how do I get the names of attributes out of an element if I don't know all the attribute names. In other Java API's there is a way of getting a list of attributes for an element i.e. by using a Nodelist. Olusola |
From: Jimmy Z. <cra...@co...> - 2006-08-24 16:28:56
|
RE: push and pop ----- Original Message -----=20 From: Walinsky, Frank=20 To: Jimmy Zhang=20 Sent: Thursday, August 24, 2006 4:47 AM Subject: RE: push and pop Jimmy, Thanks for confirming that there isn't a bug with push/pop and the = connection with AutoPilot. Rather than doing somekind of hack or custom code to get back to the = original cursor location, I decided to add additional functionality to = the AutoPilot class.=20 Here's what I did - added a temporary xpath attribute and clones of the = 3 "xpath" methods using the new attribute.=20 Now the original cursor location is not moved and my iteration works as = I had hoped. The temporary xpath lets me traverse to any descendent of the current = node. What I'm looking at now is how to have the temporary xpath work with an = absolute path. You're welcome to have the code and use it as you wish in your project. If you chose to use it, I only ask that you check it for correctness and = clean it up if/where necessary. -------------------------------------------------------------------------= ------- From: Jimmy Zhang [mailto:cra...@co...]=20 Sent: Wednesday, August 23, 2006 1:51 PM To: Walinsky, Frank Cc: vtd...@us... Subject: Re: push and pop It is great that you brought up this interesting discussion, we = certainly want to know how you use VTD-XML and how it can be made better... When you say "Xpath with the same AutoPilot to somewhere else and print = it's content." do you mean you use AutoPilot to compile a different XPath expression ?? If that is the case, if you have already lost the Xpath expression = previously compiled, and even you got back to the original position using pop(), the old xpath = expression is completely gone... Did I misunderstand anything? ----- Original Message -----=20 From: Walinsky, Frank=20 To: Jimmy Zhang=20 Sent: Wednesday, August 23, 2006 5:36 AM Subject: RE: push and pop It would be easier to have you give me a code snippet using your = product, since that's what I'm trying to use.=20 If you could provide a code snippet that shows the following = (highlighted in red and a direct copy from your website):=20 Cursor-based hierarchical view: In this view, one navigates the cursor = across the hierarchy. However, one should notice that this hierarchy is = for elements only; in other words, in our processing, we only consider = elements as part of the hierarchy, and treats text node, CDATA and = attributes as belongings of an element. Also there is one and only one = global cursor available. Duplicate of this cursor is disallowed. To = record the position of a cursor, one can either save the VTD index value = or push the cursor value into a global stack, and later pop it back. The = following code snippet navigates a very simple XML document and prints = out value of interest. =20 I need to see a working code snippet that does both ways that are = described above in red highlight.=20 Here is a simple senerio using 1 AutoPilot that would be of most use:=20 :=20 Setup, with an xpath, an iteration that will have more than one = result.=20 Do the "evalXPath" iteration.=20 Save the current location as described above in red.=20 Xpath with the same AutoPilot to somewhere else and print it's = content.=20 Reset back to the location saved previously.=20 Go back to the "evalXPath" iteration step above and get the next = iteration=20 Again - thank you for your patience and all the help you have been = giving me.=20 Frank=20 -----Original Message-----=20 From: Jimmy Zhang [mailto:cra...@co...]=20 Sent: Tuesday, August 22, 2006 5:34 PM=20 To: Walinsky, Frank=20 Cc: vtd...@li...=20 Subject: Re: push and pop=20 Yes, this is indeed how Autopilot is implemented, one xpath expression = per autoPilot object is the intended user, and nodeIteration can be = thought of as an xpath expression... I think it may be easier if there is code on how DOM would work, and I = can offer you suggestions/workarounds in VTD-XML code... If you try DOM's node iterator, it is quite similar to VTD-XML's = autoPilot=20 ----- Original Message -----=20 From: "Walinsky, Frank" <fwa...@ex...>=20 To: "Jimmy Zhang" <jz...@xi...>=20 Sent: Tuesday, August 22, 2006 1:58 PM=20 Subject: RE: push and pop=20 Using the xml doc from below:=20 I'm iterating over the "a" element and then the "b" element.=20 For each "b" element, the user wants to use one of its children(one of = the "c" elements). I have the "c" element name in a variable ( in = actual=20 practice the "c" element names are unique) and I do an xpath using the = AutoPilot and this variable to get the correct child. Then I do=20 something with the "c" element content. Now I want to go back to the = top=20 of the iteration and get the next "b" element. This is where the=20 AutoPilot thinks there are no more "b" elements when in fact there is=20 one more "b" element in the first "a" element.=20 -----Original Message-----=20 From: Jimmy Zhang [mailto:jz...@xi...]=20 Sent: Tuesday, August 22, 2006 3:57 PM=20 To: Walinsky, Frank=20 Cc: vtd...@li...=20 Subject: Re: push and pop=20 It may be a case-specific hack for you...=20 AutoPilot internally *remembers* a few variables (string name, depth=20 etc), to capture/restore, there may be additional data structure (e.g. = a=20 stack) needed to store those variables...=20 but my questions is how you really do anything different from using = DOM=20 you will still have to instantiate nodeIterators for each levels = right?=20 also vtd...@li... seems to be working now=20 ----- Original Message -----=20 From: "Walinsky, Frank" <fwa...@ex...>=20 To: "Jimmy Zhang" <jz...@xi...>=20 Sent: Tuesday, August 22, 2006 11:46 AM=20 Subject: RE: push and pop=20 What might be needed is a capture/restore of the AutoPilot along with=20 the currentoffset=20 -----Original Message-----=20 From: Jimmy Zhang [mailto:jz...@xi...]=20 Sent: Tuesday, August 22, 2006 11:19 AM=20 To: Walinsky, Frank=20 Subject: Re: push and pop=20 I need to think about this...=20 ----- Original Message -----=20 From: "Walinsky, Frank" <fwa...@ex...>=20 To: <jz...@xi...>=20 Sent: Tuesday, August 22, 2006 4:13 AM=20 Subject: RE: push and pop=20 I will try another approach using just 1 AutoPilot by trying to rework = my current code.=20 -----Original Message-----=20 From: jz...@xi... [mailto:jz...@xi...]=20 Sent: Monday, August 21, 2006 10:18 PM=20 To: Walinsky, Frank=20 Subject: Re: push and pop=20 Can you kinda explain why allocating multiple AutoPilots is=20 show-stopping??=20 because autoPilot allocation is fairly light weight? Maybe VTD-XML can = custom build something for your case...=20 Walinsky, Frank writes:=20 > Jimmy,=20 > I did try 3 different AutoPilots after I sent this and that does = work=20 > just as you thought it would.=20 > It also works without doing any push or pop.=20 > My situation has a user generated state which could have an = unlimited=20 > amount of nesting.=20 > This state is processed by some generic code, which is not custom=20 > generated but used by all user generated states.=20 > This works fine with the DOM product I'm using.=20 > I was looking to reduce the memory footprint and do a proof of = concept=20 > with your app for management.=20 > If I can't use the one AutoPilot with push and pop, I'm dead in the=20 > water with your app right out of the gate.=20 > If you could take a closer look, when you have time, and see if it = is=20 a=20 > bug or just not possible, I would greatly appreciate it.=20 > Thx for all your help,=20 > Frank=20 >=20 >=20 > ________________________________=20 >=20 > From: Jimmy Zhang [mailto:jz...@xi...]=20 > Sent: Monday, August 21, 2006 4:13 PM=20 > To: Walinsky, Frank; vtd...@li...=20 > Subject: Re: push and pop=20 >=20 >=20 > Frank, upon a quick look, I feel you might want to instantiate three = > autoPilot=20 > objects, the first one you set the element name "a," the second set=20 the=20 > element=20 > name "b," and the last one set the element "c." Could=20 > Cheers,=20 > Jimmy Zhang=20 >=20 > ----- Original Message -----=20 > From: Walinsky, Frank <mailto:fwa...@ex...>=20 > To: in...@xi...=20 > Sent: Monday, August 21, 2006 12:40 PM=20 > Subject: push and pop=20 >=20 > Jim,=20 > I apologize again for using this address but it has become=20 > completely frustrrating trying to send to the list.=20 > I just tried a handfull of times and had my message returned. I=20 > did get one through this morning so I know it does work=20 > but when is anybodies guess.=20 >=20 > Could you please look at this when you have time?=20 >=20 >=20 >=20 > Is it possible and if so, is there any sample code somewhere=20 > that does the following:=20 > (I ask because I haven't found a way or I'm probably using the=20 > api incorrectly)=20 >=20 > I'm trying to use the same AutoPilot object in a 3 level nesting=20 > using a VTDNav "push"=20 > before entering the next lower level and the VTDNav "pop" before=20 > returning to the previous higher level.=20 > Neither the "iterate" or an "evalXPath" advance to the next=20 > element after the pop.=20 >=20 > Here's a sample xml I'm using:=20 > <?xml version=3D\"1.0\" encoding=3D\"UTF-8\"?>=20 > <root>=20 > <a>=20 > <b>=20 > <c>this is abc_11</c>=20 > <c>this is abc_12</c>=20 > <c>this is abc_13</c>=20 > <c>this is abc_14</c>=20 > </b>=20 > <b>=20 > <c>this is abc_21</c>=20 > <c>this is abc_22</c>=20 > <c>this is abc_23</c>=20 > <c>this is abc_24</c>=20 > </b>=20 > </a>=20 > <a>=20 > <b>=20 > <c>this is second abc_31</c>=20 > </b>=20 > </a>=20 > </root>=20 >=20 >=20 > Here's a snippet of my code.=20 >=20 > vn.toElement(VTDNav.ROOT);=20 >=20 > ap.selectElement("a");=20 > while (ap.iterate()) {=20 > System.out.println("--- before push() of \"a\"---");=20 > vn.dumpContext();=20 > vn.push();=20 > System.out.println("a =3D " + vn.getCurrentIndex());=20 >=20 > ap.selectElement("b");=20 > while (ap.iterate()) {=20 > System.out.println("--- before push() of \"b\" ---");=20 > vn.dumpContext();=20 > vn.push();=20 > System.out.println("b =3D " + vn.getCurrentIndex());=20 >=20 > ap.selectElement("c");=20 > while (ap.iterate()) {=20 > System.out.println("c =3D " + vn.getCurrentIndex());=20 > }=20 >=20 > vn.pop();=20 > System.out.println("--- after pop() of \"b\" ---");=20 > vn.dumpContext();=20 > }=20 >=20 > vn.pop();=20 > System.out.println("--- after pop() of \"a\" ---");=20 > vn.dumpContext();=20 > }=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 |
From: Jimmy Z. <cra...@co...> - 2006-08-23 18:54:55
|
RE: push and pop ----- Original Message -----=20 From: Walinsky, Frank=20 To: Jimmy Zhang=20 Sent: Wednesday, August 23, 2006 11:44 AM Subject: RE: push and pop -------------------------------------------------------------------------= ------- From: Jimmy Zhang [mailto:cra...@co...]=20 Sent: Wednesday, August 23, 2006 1:51 PM To: Walinsky, Frank Cc: vtd...@us... Subject: Re: push and pop It is great that you brought up this interesting discussion, we = certainly want to know how you use VTD-XML and how it can be made better... When you say "Xpath with the same AutoPilot to somewhere else and print = it's content." do you mean you use AutoPilot to compile a different XPath expression ?? [Walinsky, Frank] yes, I compile a different XPath and I want to use the = current iteration element as the new xpath's starting point If that is the case, if you have already lost the Xpath expression = previously compiled, and even you got back to the original position using pop(), the old xpath = expression is completely gone... [Walinsky, Frank] that's why I thought the push/pop should include any = and all structures or attributes that can restore to a previous point.=20 Did I misunderstand anything? [Walinsky, Frank] you nailed it right on the head=20 ----- Original Message -----=20 From: Walinsky, Frank=20 To: Jimmy Zhang=20 Sent: Wednesday, August 23, 2006 5:36 AM Subject: RE: push and pop It would be easier to have you give me a code snippet using your = product, since that's what I'm trying to use.=20 If you could provide a code snippet that shows the following = (highlighted in red and a direct copy from your website):=20 Cursor-based hierarchical view: In this view, one navigates the cursor = across the hierarchy. However, one should notice that this hierarchy is = for elements only; in other words, in our processing, we only consider = elements as part of the hierarchy, and treats text node, CDATA and = attributes as belongings of an element. Also there is one and only one = global cursor available. Duplicate of this cursor is disallowed. To = record the position of a cursor, one can either save the VTD index value = or push the cursor value into a global stack, and later pop it back. The = following code snippet navigates a very simple XML document and prints = out value of interest. =20 I need to see a working code snippet that does both ways that are = described above in red highlight.=20 Here is a simple senerio using 1 AutoPilot that would be of most use:=20 :=20 Setup, with an xpath, an iteration that will have more than one = result.=20 Do the "evalXPath" iteration.=20 Save the current location as described above in red.=20 Xpath with the same AutoPilot to somewhere else and print it's = content.=20 Reset back to the location saved previously.=20 Go back to the "evalXPath" iteration step above and get the next = iteration=20 Again - thank you for your patience and all the help you have been = giving me.=20 Frank=20 -----Original Message-----=20 From: Jimmy Zhang [mailto:cra...@co...]=20 Sent: Tuesday, August 22, 2006 5:34 PM=20 To: Walinsky, Frank=20 Cc: vtd...@li...=20 Subject: Re: push and pop=20 Yes, this is indeed how Autopilot is implemented, one xpath expression = per autoPilot object is the intended user, and nodeIteration can be = thought of as an xpath expression... I think it may be easier if there is code on how DOM would work, and I = can offer you suggestions/workarounds in VTD-XML code... If you try DOM's node iterator, it is quite similar to VTD-XML's = autoPilot=20 ----- Original Message -----=20 From: "Walinsky, Frank" <fwa...@ex...>=20 To: "Jimmy Zhang" <jz...@xi...>=20 Sent: Tuesday, August 22, 2006 1:58 PM=20 Subject: RE: push and pop=20 Using the xml doc from below:=20 I'm iterating over the "a" element and then the "b" element.=20 For each "b" element, the user wants to use one of its children(one of = the "c" elements). I have the "c" element name in a variable ( in = actual=20 practice the "c" element names are unique) and I do an xpath using the = AutoPilot and this variable to get the correct child. Then I do=20 something with the "c" element content. Now I want to go back to the = top=20 of the iteration and get the next "b" element. This is where the=20 AutoPilot thinks there are no more "b" elements when in fact there is=20 one more "b" element in the first "a" element.=20 -----Original Message-----=20 From: Jimmy Zhang [mailto:jz...@xi...]=20 Sent: Tuesday, August 22, 2006 3:57 PM=20 To: Walinsky, Frank=20 Cc: vtd...@li...=20 Subject: Re: push and pop=20 It may be a case-specific hack for you...=20 AutoPilot internally *remembers* a few variables (string name, depth=20 etc), to capture/restore, there may be additional data structure (e.g. = a=20 stack) needed to store those variables...=20 but my questions is how you really do anything different from using = DOM=20 you will still have to instantiate nodeIterators for each levels = right?=20 also vtd...@li... seems to be working now=20 ----- Original Message -----=20 From: "Walinsky, Frank" <fwa...@ex...>=20 To: "Jimmy Zhang" <jz...@xi...>=20 Sent: Tuesday, August 22, 2006 11:46 AM=20 Subject: RE: push and pop=20 What might be needed is a capture/restore of the AutoPilot along with=20 the currentoffset=20 -----Original Message-----=20 From: Jimmy Zhang [mailto:jz...@xi...]=20 Sent: Tuesday, August 22, 2006 11:19 AM=20 To: Walinsky, Frank=20 Subject: Re: push and pop=20 I need to think about this...=20 ----- Original Message -----=20 From: "Walinsky, Frank" <fwa...@ex...>=20 To: <jz...@xi...>=20 Sent: Tuesday, August 22, 2006 4:13 AM=20 Subject: RE: push and pop=20 I will try another approach using just 1 AutoPilot by trying to rework = my current code.=20 -----Original Message-----=20 From: jz...@xi... [mailto:jz...@xi...]=20 Sent: Monday, August 21, 2006 10:18 PM=20 To: Walinsky, Frank=20 Subject: Re: push and pop=20 Can you kinda explain why allocating multiple AutoPilots is=20 show-stopping??=20 because autoPilot allocation is fairly light weight? Maybe VTD-XML can = custom build something for your case...=20 Walinsky, Frank writes:=20 > Jimmy,=20 > I did try 3 different AutoPilots after I sent this and that does = work=20 > just as you thought it would.=20 > It also works without doing any push or pop.=20 > My situation has a user generated state which could have an = unlimited=20 > amount of nesting.=20 > This state is processed by some generic code, which is not custom=20 > generated but used by all user generated states.=20 > This works fine with the DOM product I'm using.=20 > I was looking to reduce the memory footprint and do a proof of = concept=20 > with your app for management.=20 > If I can't use the one AutoPilot with push and pop, I'm dead in the=20 > water with your app right out of the gate.=20 > If you could take a closer look, when you have time, and see if it = is=20 a=20 > bug or just not possible, I would greatly appreciate it.=20 > Thx for all your help,=20 > Frank=20 >=20 >=20 > ________________________________=20 >=20 > From: Jimmy Zhang [mailto:jz...@xi...]=20 > Sent: Monday, August 21, 2006 4:13 PM=20 > To: Walinsky, Frank; vtd...@li...=20 > Subject: Re: push and pop=20 >=20 >=20 > Frank, upon a quick look, I feel you might want to instantiate three = > autoPilot=20 > objects, the first one you set the element name "a," the second set=20 the=20 > element=20 > name "b," and the last one set the element "c." Could=20 > Cheers,=20 > Jimmy Zhang=20 >=20 > ----- Original Message -----=20 > From: Walinsky, Frank <mailto:fwa...@ex...>=20 > To: in...@xi...=20 > Sent: Monday, August 21, 2006 12:40 PM=20 > Subject: push and pop=20 >=20 > Jim,=20 > I apologize again for using this address but it has become=20 > completely frustrrating trying to send to the list.=20 > I just tried a handfull of times and had my message returned. I=20 > did get one through this morning so I know it does work=20 > but when is anybodies guess.=20 >=20 > Could you please look at this when you have time?=20 >=20 >=20 >=20 > Is it possible and if so, is there any sample code somewhere=20 > that does the following:=20 > (I ask because I haven't found a way or I'm probably using the=20 > api incorrectly)=20 >=20 > I'm trying to use the same AutoPilot object in a 3 level nesting=20 > using a VTDNav "push"=20 > before entering the next lower level and the VTDNav "pop" before=20 > returning to the previous higher level.=20 > Neither the "iterate" or an "evalXPath" advance to the next=20 > element after the pop.=20 >=20 > Here's a sample xml I'm using:=20 > <?xml version=3D\"1.0\" encoding=3D\"UTF-8\"?>=20 > <root>=20 > <a>=20 > <b>=20 > <c>this is abc_11</c>=20 > <c>this is abc_12</c>=20 > <c>this is abc_13</c>=20 > <c>this is abc_14</c>=20 > </b>=20 > <b>=20 > <c>this is abc_21</c>=20 > <c>this is abc_22</c>=20 > <c>this is abc_23</c>=20 > <c>this is abc_24</c>=20 > </b>=20 > </a>=20 > <a>=20 > <b>=20 > <c>this is second abc_31</c>=20 > </b>=20 > </a>=20 > </root>=20 >=20 >=20 > Here's a snippet of my code.=20 >=20 > vn.toElement(VTDNav.ROOT);=20 >=20 > ap.selectElement("a");=20 > while (ap.iterate()) {=20 > System.out.println("--- before push() of \"a\"---");=20 > vn.dumpContext();=20 > vn.push();=20 > System.out.println("a =3D " + vn.getCurrentIndex());=20 >=20 > ap.selectElement("b");=20 > while (ap.iterate()) {=20 > System.out.println("--- before push() of \"b\" ---");=20 > vn.dumpContext();=20 > vn.push();=20 > System.out.println("b =3D " + vn.getCurrentIndex());=20 >=20 > ap.selectElement("c");=20 > while (ap.iterate()) {=20 > System.out.println("c =3D " + vn.getCurrentIndex());=20 > }=20 >=20 > vn.pop();=20 > System.out.println("--- after pop() of \"b\" ---");=20 > vn.dumpContext();=20 > }=20 >=20 > vn.pop();=20 > System.out.println("--- after pop() of \"a\" ---");=20 > vn.dumpContext();=20 > }=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 |
From: Jimmy Z. <cra...@co...> - 2006-08-23 17:59:11
|
RE: push and pop ----- Original Message -----=20 From: Jimmy Zhang=20 To: Walinsky, Frank=20 Cc: vtd...@us...=20 Sent: Wednesday, August 23, 2006 10:51 AM Subject: Re: push and pop It is great that you brought up this interesting discussion, we = certainly want to know how you use VTD-XML and how it can be made better... When you say "Xpath with the same AutoPilot to somewhere else and print = it's content." do you mean you use AutoPilot to compile a different XPath expression ?? If that is the case, if you have already lost the Xpath expression = previously compiled, and even you got back to the original position using pop(), the old xpath = expression is completely gone... Did I misunderstand anything? ----- Original Message -----=20 From: Walinsky, Frank=20 To: Jimmy Zhang=20 Sent: Wednesday, August 23, 2006 5:36 AM Subject: RE: push and pop It would be easier to have you give me a code snippet using your = product, since that's what I'm trying to use.=20 If you could provide a code snippet that shows the following = (highlighted in red and a direct copy from your website):=20 Cursor-based hierarchical view: In this view, one navigates the cursor = across the hierarchy. However, one should notice that this hierarchy is = for elements only; in other words, in our processing, we only consider = elements as part of the hierarchy, and treats text node, CDATA and = attributes as belongings of an element. Also there is one and only one = global cursor available. Duplicate of this cursor is disallowed. To = record the position of a cursor, one can either save the VTD index value = or push the cursor value into a global stack, and later pop it back. The = following code snippet navigates a very simple XML document and prints = out value of interest. =20 I need to see a working code snippet that does both ways that are = described above in red highlight.=20 Here is a simple senerio using 1 AutoPilot that would be of most use:=20 :=20 Setup, with an xpath, an iteration that will have more than one = result.=20 Do the "evalXPath" iteration.=20 Save the current location as described above in red.=20 Xpath with the same AutoPilot to somewhere else and print it's = content.=20 Reset back to the location saved previously.=20 Go back to the "evalXPath" iteration step above and get the next = iteration=20 Again - thank you for your patience and all the help you have been = giving me.=20 Frank=20 -----Original Message-----=20 From: Jimmy Zhang [mailto:cra...@co...]=20 Sent: Tuesday, August 22, 2006 5:34 PM=20 To: Walinsky, Frank=20 Cc: vtd...@li...=20 Subject: Re: push and pop=20 Yes, this is indeed how Autopilot is implemented, one xpath expression = per autoPilot object is the intended user, and nodeIteration can be = thought of as an xpath expression... I think it may be easier if there is code on how DOM would work, and I = can offer you suggestions/workarounds in VTD-XML code... If you try DOM's node iterator, it is quite similar to VTD-XML's = autoPilot=20 ----- Original Message -----=20 From: "Walinsky, Frank" <fwa...@ex...>=20 To: "Jimmy Zhang" <jz...@xi...>=20 Sent: Tuesday, August 22, 2006 1:58 PM=20 Subject: RE: push and pop=20 Using the xml doc from below:=20 I'm iterating over the "a" element and then the "b" element.=20 For each "b" element, the user wants to use one of its children(one of = the "c" elements). I have the "c" element name in a variable ( in = actual=20 practice the "c" element names are unique) and I do an xpath using the = AutoPilot and this variable to get the correct child. Then I do=20 something with the "c" element content. Now I want to go back to the = top=20 of the iteration and get the next "b" element. This is where the=20 AutoPilot thinks there are no more "b" elements when in fact there is=20 one more "b" element in the first "a" element.=20 -----Original Message-----=20 From: Jimmy Zhang [mailto:jz...@xi...]=20 Sent: Tuesday, August 22, 2006 3:57 PM=20 To: Walinsky, Frank=20 Cc: vtd...@li...=20 Subject: Re: push and pop=20 It may be a case-specific hack for you...=20 AutoPilot internally *remembers* a few variables (string name, depth=20 etc), to capture/restore, there may be additional data structure (e.g. = a=20 stack) needed to store those variables...=20 but my questions is how you really do anything different from using = DOM=20 you will still have to instantiate nodeIterators for each levels = right?=20 also vtd...@li... seems to be working now=20 ----- Original Message -----=20 From: "Walinsky, Frank" <fwa...@ex...>=20 To: "Jimmy Zhang" <jz...@xi...>=20 Sent: Tuesday, August 22, 2006 11:46 AM=20 Subject: RE: push and pop=20 What might be needed is a capture/restore of the AutoPilot along with=20 the currentoffset=20 -----Original Message-----=20 From: Jimmy Zhang [mailto:jz...@xi...]=20 Sent: Tuesday, August 22, 2006 11:19 AM=20 To: Walinsky, Frank=20 Subject: Re: push and pop=20 I need to think about this...=20 ----- Original Message -----=20 From: "Walinsky, Frank" <fwa...@ex...>=20 To: <jz...@xi...>=20 Sent: Tuesday, August 22, 2006 4:13 AM=20 Subject: RE: push and pop=20 I will try another approach using just 1 AutoPilot by trying to rework = my current code.=20 -----Original Message-----=20 From: jz...@xi... [mailto:jz...@xi...]=20 Sent: Monday, August 21, 2006 10:18 PM=20 To: Walinsky, Frank=20 Subject: Re: push and pop=20 Can you kinda explain why allocating multiple AutoPilots is=20 show-stopping??=20 because autoPilot allocation is fairly light weight? Maybe VTD-XML can = custom build something for your case...=20 Walinsky, Frank writes:=20 > Jimmy,=20 > I did try 3 different AutoPilots after I sent this and that does = work=20 > just as you thought it would.=20 > It also works without doing any push or pop.=20 > My situation has a user generated state which could have an = unlimited=20 > amount of nesting.=20 > This state is processed by some generic code, which is not custom=20 > generated but used by all user generated states.=20 > This works fine with the DOM product I'm using.=20 > I was looking to reduce the memory footprint and do a proof of = concept=20 > with your app for management.=20 > If I can't use the one AutoPilot with push and pop, I'm dead in the=20 > water with your app right out of the gate.=20 > If you could take a closer look, when you have time, and see if it = is=20 a=20 > bug or just not possible, I would greatly appreciate it.=20 > Thx for all your help,=20 > Frank=20 >=20 >=20 > ________________________________=20 >=20 > From: Jimmy Zhang [mailto:jz...@xi...]=20 > Sent: Monday, August 21, 2006 4:13 PM=20 > To: Walinsky, Frank; vtd...@li...=20 > Subject: Re: push and pop=20 >=20 >=20 > Frank, upon a quick look, I feel you might want to instantiate three = > autoPilot=20 > objects, the first one you set the element name "a," the second set=20 the=20 > element=20 > name "b," and the last one set the element "c." Could=20 > Cheers,=20 > Jimmy Zhang=20 >=20 > ----- Original Message -----=20 > From: Walinsky, Frank <mailto:fwa...@ex...>=20 > To: in...@xi...=20 > Sent: Monday, August 21, 2006 12:40 PM=20 > Subject: push and pop=20 >=20 > Jim,=20 > I apologize again for using this address but it has become=20 > completely frustrrating trying to send to the list.=20 > I just tried a handfull of times and had my message returned. I=20 > did get one through this morning so I know it does work=20 > but when is anybodies guess.=20 >=20 > Could you please look at this when you have time?=20 >=20 >=20 >=20 > Is it possible and if so, is there any sample code somewhere=20 > that does the following:=20 > (I ask because I haven't found a way or I'm probably using the=20 > api incorrectly)=20 >=20 > I'm trying to use the same AutoPilot object in a 3 level nesting=20 > using a VTDNav "push"=20 > before entering the next lower level and the VTDNav "pop" before=20 > returning to the previous higher level.=20 > Neither the "iterate" or an "evalXPath" advance to the next=20 > element after the pop.=20 >=20 > Here's a sample xml I'm using:=20 > <?xml version=3D\"1.0\" encoding=3D\"UTF-8\"?>=20 > <root>=20 > <a>=20 > <b>=20 > <c>this is abc_11</c>=20 > <c>this is abc_12</c>=20 > <c>this is abc_13</c>=20 > <c>this is abc_14</c>=20 > </b>=20 > <b>=20 > <c>this is abc_21</c>=20 > <c>this is abc_22</c>=20 > <c>this is abc_23</c>=20 > <c>this is abc_24</c>=20 > </b>=20 > </a>=20 > <a>=20 > <b>=20 > <c>this is second abc_31</c>=20 > </b>=20 > </a>=20 > </root>=20 >=20 >=20 > Here's a snippet of my code.=20 >=20 > vn.toElement(VTDNav.ROOT);=20 >=20 > ap.selectElement("a");=20 > while (ap.iterate()) {=20 > System.out.println("--- before push() of \"a\"---");=20 > vn.dumpContext();=20 > vn.push();=20 > System.out.println("a =3D " + vn.getCurrentIndex());=20 >=20 > ap.selectElement("b");=20 > while (ap.iterate()) {=20 > System.out.println("--- before push() of \"b\" ---");=20 > vn.dumpContext();=20 > vn.push();=20 > System.out.println("b =3D " + vn.getCurrentIndex());=20 >=20 > ap.selectElement("c");=20 > while (ap.iterate()) {=20 > System.out.println("c =3D " + vn.getCurrentIndex());=20 > }=20 >=20 > vn.pop();=20 > System.out.println("--- after pop() of \"b\" ---");=20 > vn.dumpContext();=20 > }=20 >=20 > vn.pop();=20 > System.out.println("--- after pop() of \"a\" ---");=20 > vn.dumpContext();=20 > }=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 |
From: Jimmy Z. <cra...@co...> - 2006-08-22 21:34:45
|
Yes, this is indeed how Autopilot is implemented, one xpath expression per autoPilot object is the intended user, and nodeIteration can be thought of as an xpath expression... I think it may be easier if there is code on how DOM would work, and I can offer you suggestions/workarounds in VTD-XML code... If you try DOM's node iterator, it is quite similar to VTD-XML's autoPilot ----- Original Message ----- From: "Walinsky, Frank" <fwa...@ex...> To: "Jimmy Zhang" <jz...@xi...> Sent: Tuesday, August 22, 2006 1:58 PM Subject: RE: push and pop Using the xml doc from below: I'm iterating over the "a" element and then the "b" element. For each "b" element, the user wants to use one of its children(one of the "c" elements). I have the "c" element name in a variable ( in actual practice the "c" element names are unique) and I do an xpath using the AutoPilot and this variable to get the correct child. Then I do something with the "c" element content. Now I want to go back to the top of the iteration and get the next "b" element. This is where the AutoPilot thinks there are no more "b" elements when in fact there is one more "b" element in the first "a" element. -----Original Message----- From: Jimmy Zhang [mailto:jz...@xi...] Sent: Tuesday, August 22, 2006 3:57 PM To: Walinsky, Frank Cc: vtd...@li... Subject: Re: push and pop It may be a case-specific hack for you... AutoPilot internally *remembers* a few variables (string name, depth etc), to capture/restore, there may be additional data structure (e.g. a stack) needed to store those variables... but my questions is how you really do anything different from using DOM you will still have to instantiate nodeIterators for each levels right? also vtd...@li... seems to be working now ----- Original Message ----- From: "Walinsky, Frank" <fwa...@ex...> To: "Jimmy Zhang" <jz...@xi...> Sent: Tuesday, August 22, 2006 11:46 AM Subject: RE: push and pop What might be needed is a capture/restore of the AutoPilot along with the currentoffset -----Original Message----- From: Jimmy Zhang [mailto:jz...@xi...] Sent: Tuesday, August 22, 2006 11:19 AM To: Walinsky, Frank Subject: Re: push and pop I need to think about this... ----- Original Message ----- From: "Walinsky, Frank" <fwa...@ex...> To: <jz...@xi...> Sent: Tuesday, August 22, 2006 4:13 AM Subject: RE: push and pop I will try another approach using just 1 AutoPilot by trying to rework my current code. -----Original Message----- From: jz...@xi... [mailto:jz...@xi...] Sent: Monday, August 21, 2006 10:18 PM To: Walinsky, Frank Subject: Re: push and pop Can you kinda explain why allocating multiple AutoPilots is show-stopping?? because autoPilot allocation is fairly light weight? Maybe VTD-XML can custom build something for your case... Walinsky, Frank writes: > Jimmy, > I did try 3 different AutoPilots after I sent this and that does work > just as you thought it would. > It also works without doing any push or pop. > My situation has a user generated state which could have an unlimited > amount of nesting. > This state is processed by some generic code, which is not custom > generated but used by all user generated states. > This works fine with the DOM product I'm using. > I was looking to reduce the memory footprint and do a proof of concept > with your app for management. > If I can't use the one AutoPilot with push and pop, I'm dead in the > water with your app right out of the gate. > If you could take a closer look, when you have time, and see if it is a > bug or just not possible, I would greatly appreciate it. > Thx for all your help, > Frank > > > ________________________________ > > From: Jimmy Zhang [mailto:jz...@xi...] > Sent: Monday, August 21, 2006 4:13 PM > To: Walinsky, Frank; vtd...@li... > Subject: Re: push and pop > > > Frank, upon a quick look, I feel you might want to instantiate three > autoPilot > objects, the first one you set the element name "a," the second set the > element > name "b," and the last one set the element "c." Could > Cheers, > Jimmy Zhang > > ----- Original Message ----- > From: Walinsky, Frank <mailto:fwa...@ex...> > To: in...@xi... > Sent: Monday, August 21, 2006 12:40 PM > Subject: push and pop > > Jim, > I apologize again for using this address but it has become > completely frustrrating trying to send to the list. > I just tried a handfull of times and had my message returned. I > did get one through this morning so I know it does work > but when is anybodies guess. > > Could you please look at this when you have time? > > > > Is it possible and if so, is there any sample code somewhere > that does the following: > (I ask because I haven't found a way or I'm probably using the > api incorrectly) > > I'm trying to use the same AutoPilot object in a 3 level nesting > using a VTDNav "push" > before entering the next lower level and the VTDNav "pop" before > returning to the previous higher level. > Neither the "iterate" or an "evalXPath" advance to the next > element after the pop. > > Here's a sample xml I'm using: > <?xml version=\"1.0\" encoding=\"UTF-8\"?> > <root> > <a> > <b> > <c>this is abc_11</c> > <c>this is abc_12</c> > <c>this is abc_13</c> > <c>this is abc_14</c> > </b> > <b> > <c>this is abc_21</c> > <c>this is abc_22</c> > <c>this is abc_23</c> > <c>this is abc_24</c> > </b> > </a> > <a> > <b> > <c>this is second abc_31</c> > </b> > </a> > </root> > > > Here's a snippet of my code. > > vn.toElement(VTDNav.ROOT); > > ap.selectElement("a"); > while (ap.iterate()) { > System.out.println("--- before push() of \"a\"---"); > vn.dumpContext(); > vn.push(); > System.out.println("a = " + vn.getCurrentIndex()); > > ap.selectElement("b"); > while (ap.iterate()) { > System.out.println("--- before push() of \"b\" ---"); > vn.dumpContext(); > vn.push(); > System.out.println("b = " + vn.getCurrentIndex()); > > ap.selectElement("c"); > while (ap.iterate()) { > System.out.println("c = " + vn.getCurrentIndex()); > } > > vn.pop(); > System.out.println("--- after pop() of \"b\" ---"); > vn.dumpContext(); > } > > vn.pop(); > System.out.println("--- after pop() of \"a\" ---"); > vn.dumpContext(); > } > > > > > > > |