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: Jimmy Z. <cra...@co...> - 2006-11-24 17:42:12
|
Can you Switch to 1.5 version of JDK? ----- Original Message -----=20 From: Aakash Jain=20 To: Vtd...@li...=20 Sent: Friday, November 24, 2006 5:38 AM Subject: [Vtd-xml-users] = java.lang.UnsupportedClassVersionError:com/ximpleware/VTDGen = (Unsupported major.minor version 49.0) Hi, i got the following error while using vtd-xml parser java.lang.UnsupportedClassVersionError: com/ximpleware/VTDGen = (Unsupported major.minor version 49.0) [java] at java.lang.ClassLoader.defineClass0 (Native Method) [java] at = java.lang.ClassLoader.defineClass(ClassLoader.java:486) ................................ i compiled the source with jdk1.3, but then i got=20 NoSuchMethodError for autoPilot.selectXPath(string) can u help in this. i cant use jdk1.4 or 1.5 is there any version of vtd-xml that is compiled on 1.3? thanks --=20 Aakash Jain PUCSD -- " There are 10 types of people in this world, those who understand = binary and others who don't. "=20 -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV -------------------------------------------------------------------------= ----- _______________________________________________ Vtd-xml-users mailing list Vtd...@li... https://lists.sourceforge.net/lists/listinfo/vtd-xml-users |
From: Aakash J. <aak...@gm...> - 2006-11-24 13:39:03
|
Hi, i got the following error while using vtd-xml parser java.lang.UnsupportedClassVersionError: com/ximpleware/VTDGen (Unsupported major.minor version 49.0) [java] at java.lang.ClassLoader.defineClass0(Native Method) [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:486) ................................ i compiled the source with jdk1.3, but then i got NoSuchMethodError for autoPilot.selectXPath(string) can u help in this. i cant use jdk1.4 or 1.5 is there any version of vtd-xml that is compiled on 1.3? thanks -- Aakash Jain PUCSD -- " There are 10 types of people in this world, those who understand binary and others who don't. " |
From: Jimmy Z. <cra...@co...> - 2006-11-22 17:34:55
|
Are you compiling on linux? using gcc and make? ----- Original Message -----=20 From: suntrees=20 To: vtd...@li...=20 Sent: Wednesday, November 22, 2006 3:14 AM Subject: [Vtd-xml-users] One question when compiling the vtd-xml hello,everyone, =20 I met one error when compiling the vtd-xml version 1.8.c, the = detail describe as belows: =20 lex.yy.o(.text+0xf10): In function `yylex': : undefined reference to `_wcsdup' lex.yy.o(.text+0x1a91): In function `yylex': : undefined reference to `_wcsdup' literalExpr.o(.text+0x17c): In function `evalString_le': : undefined reference to `_wcsdup' numberExpr.o(.text+0x141): In function `evalString_ne': : undefined reference to `_wcsdup' binaryExpr.o(.text+0x131b): In function `evalString_be': : undefined reference to `_wcsdup' binaryExpr.o(.text+0x1348): more undefined references to `_wcsdup' = follow collect2: ld returned 1 exit status make: *** [vtd-xml] Error 1 =20 =20 I don't know why, and who can help me?=20 =20 Thanks Best Bless! =20 = Dark Yuan = 2006/11/22 -------------------------------------------------------------------------= ----- =C2=CA=CF=C8=B3=A2=CA=D4 Windows Live Mail=A1=A3 Windows Live Mail=20 -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV -------------------------------------------------------------------------= ----- _______________________________________________ Vtd-xml-users mailing list Vtd...@li... https://lists.sourceforge.net/lists/listinfo/vtd-xml-users |
From: suntrees <sun...@ho...> - 2006-11-22 11:14:49
|
hello,everyone, I met one error when compiling the vtd-xml version 1.8.c, the detail describe as belows: lex.yy.o(.text+0xf10): In function `yylex':: undefined reference to `_wcsdup'lex.yy.o(.text+0x1a91): In function `yylex':: undefined reference to `_wcsdup'literalExpr.o(.text+0x17c): In function `evalString_le':: undefined reference to `_wcsdup'numberExpr.o(.text+0x141): In function `evalString_ne':: undefined reference to `_wcsdup'binaryExpr.o(.text+0x131b): In function `evalString_be':: undefined reference to `_wcsdup'binaryExpr.o(.text+0x1348): more undefined references to `_wcsdup' followcollect2: ld returned 1 exit statusmake: *** [vtd-xml] Error 1 I don't know why, and who can help me? Thanks Best Bless! Dark Yuan 2006/11/22 _________________________________________________________________ Windows Live Safety Center 为您的计算机提供免费的安全扫描服务。 http://safety.live.com/site/ZH-CN/default.htm |
From: Jimmy Z. <cra...@co...> - 2006-11-22 08:24:09
|
Version 1.8 of VTD-XML is now released. The new features are: · XMLModifier is a easy to use class that takes advantage of the incremental update capability offered by VTD-XML · XPath built-in functions are now almost complete · This release added encoding support for iso-8859-2~10, windows code page 1250~1258 · Added various functions to autoPilot that evaluate XPath to string, number and boolean · This release also fixes a number of XPath bugs related to string handling |
From: Tatu S. <cow...@ya...> - 2006-11-22 00:22:20
|
--- Jimmy Zhang <cra...@co...> wrote: > I am wondering if there is a easy and quick way to > get rid of all > the external entity reference defined in DTD... > For version 2.0, it would be nice to offer a utility > that help people > convert the XML files with external entities to ones > without... Could be... but I have to say that properly dealing with DTDs, and especially entities, is lots of work. Probably more than 2/3 of work I have done with Woodstox has had to do with DTD-based features: dealing with nested input sources, parameter entity expansions and all related complexities (validity constraints of DTD itself) is much more complicated than basic xml parsing. DTD validation itself is not that hard, it's just building one's usual state machine (from dragon book or so), although even that is quite a bit of work. So I can understand why many parsers just choose to leave DTDs alone. ;-) There is no easy way to get rid of general entities; although perhaps it would be enough to just deal with common cases (ie. allow plugging in entity handlers for any unknown entity, and let using app define expansion, not xml parser). -+ Tatu +- ____________________________________________________________________________________ Sponsored Link $200,000 mortgage for $660/ mo 30/15 yr fixed, reduce debt http://yahoo.ratemarketplace.com |
From: Jimmy Z. <cra...@co...> - 2006-11-21 08:15:00
|
I am wondering if there is a easy and quick way to get rid of all the external entity reference defined in DTD... For version 2.0, it would be nice to offer a utility that help people convert the XML files with external entities to ones without... ----- Original Message ----- From: "Tatu Saloranta" <cow...@ya...> To: "Paul Tomsic" <pt...@gm...> Cc: <vtd...@li...> Sent: Monday, November 20, 2006 9:16 PM Subject: Re: [Vtd-xml-users] mixed content? > --- Paul Tomsic <pt...@gm...> wrote: > >> On 11/19/06, Tatu Saloranta <cow...@ya...> >> wrote: >> > Perhaps better question is do you really have to > do it? >> > I must admit I do not quite understand your use >> case >> > yet. Perhaps you do need it from schema, or > perhaps >> >> my use case is embedding HTML in a node and >> retrieving it as such. >> >> so, >> >> <foo><em>emphasis</em> and then some <b>bold</b> >> text as well</foo> >> >> I'd be looking to retrieve everything within the foo >> element, as is. > > Well, for that you don't really need schema; you can > just > see if there is mixed content. Schema tells you if > that's > theoretically possible (schemas basically define > document > classes), but instance tells you if there is actual > mixed > content. > > As to getting all contents under specific element, > that's > something VTD-XML gives efficient and quite > straight-forward > methods to do (just need start/end offsets of > start/end > tags involved, and can do straight copy). > > Perhaps that's all you need? > > -+ Tatu +- > > > > > ____________________________________________________________________________________ > Sponsored Link > > Online degrees - find the right program to advance your career. > www.nextag.com > > ------------------------------------------------------------------------- > 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: Tatu S. <cow...@ya...> - 2006-11-21 05:16:38
|
--- Paul Tomsic <pt...@gm...> wrote: > On 11/19/06, Tatu Saloranta <cow...@ya...> > wrote: > > Perhaps better question is do you really have to do it? > > I must admit I do not quite understand your use > case > > yet. Perhaps you do need it from schema, or perhaps > > my use case is embedding HTML in a node and > retrieving it as such. > > so, > > <foo><em>emphasis</em> and then some <b>bold</b> > text as well</foo> > > I'd be looking to retrieve everything within the foo > element, as is. Well, for that you don't really need schema; you can just see if there is mixed content. Schema tells you if that's theoretically possible (schemas basically define document classes), but instance tells you if there is actual mixed content. As to getting all contents under specific element, that's something VTD-XML gives efficient and quite straight-forward methods to do (just need start/end offsets of start/end tags involved, and can do straight copy). Perhaps that's all you need? -+ Tatu +- ____________________________________________________________________________________ Sponsored Link Online degrees - find the right program to advance your career. www.nextag.com |
From: Paul T. <pt...@gm...> - 2006-11-20 13:28:52
|
On 11/19/06, Tatu Saloranta <cow...@ya...> wrote: > Perhaps better question is do you really have to do > it? > I must admit I do not quite understand your use case > yet. Perhaps you do need it from schema, or perhaps my use case is embedding HTML in a node and retrieving it as such. so, <foo><em>emphasis</em> and then some <b>bold</b> text as well</foo> I'd be looking to retrieve everything within the foo element, as is. |
From: Tatu S. <cow...@ya...> - 2006-11-20 05:32:47
|
--- Paul Tomsic <pt...@gm...> wrote: > since they are so hard to find (tools that provide > the ability to see > if a node is marked as mixed=true) then how does > anyone do this? Perhaps better question is do you really have to do it? I must admit I do not quite understand your use case yet. Perhaps you do need it from schema, or perhaps there is another way around it. It's bit hard to say without knowing exactly what you are trying to do. Now, schemas are generally used either for validation, or for data binding. It is much less common to try to do schema introspetion, so most schema processors thus are either embedded in parsers, or in stand-alone validation or data binding tools. As to finding schema processing tool -- I don't really have a need for one, so I just googled for 10 minutes, and didn't find optimal open source tool yet. But if you do, you may be willing to spend more and investigate hits, to find one. ... > suitable solution, then we've resorted to marking > that content as > CDATA. Yeah, in general using CDATA is pretty much always the wrong solution, except when manually writing xml content. It doesn't provide any value beyond more human readability -- any content wrapped in CDATA could be as well quoted using character entities. -+ Tatu +- ____________________________________________________________________________________ Sponsored Link Mortgage rates near 39yr lows. $510k for $1,698/mo. Calculate new payment! www.LowerMyBills.com/lre |
From: Paul T. <pt...@gm...> - 2006-11-19 14:14:46
|
since they are so hard to find (tools that provide the ability to see if a node is marked as mixed=true) then how does anyone do this? we provide a lot of content via xml files that are auto-generated, often times containing mixed content. since i couldn't find a suitable solution, then we've resorted to marking that content as CDATA. this isn't ideal, but seems to be the only viable option. the reason it's non-ideal in my opinion, is if an embedded html tag is for some reason not closed, say an open bold tag, for instance, then the CDATA marking around it doesn't care, but the contents internally would now not be balanced, and could throw off the whole front-end. On 11/18/06, Tatu Saloranta <cow...@ya...> wrote: > --- Paul Tomsic <pt...@gm...> wrote: > > > thanks for the information. any suggestions on what > > to use for this > > type of information? > > i tried w/ xerces, but the "xs" package of classes > > contains a ton of > > code, and i wasn't able to successfully do what i'm > > aspiring to do . > > Good question. I thought I saw an announcement a while > ago for something that would do it, but couldn't yet > find it by googling. Xerces definitely has such a > beast embedded, and Multi-Schema Validator (MSV) also > must have something like that. The main problem is > that they don't seem to expose it, beyond making > validator objects available. Saxon XSLT processor's > commercial version (SA) does have it, but it's not > free. JaxME seems to have some extension > (http://ws.apache.org/jaxme/xs/), labeled as "The > JaxMe parser for XML Schema" which might help, but I'm > not sure (it seems to be geared towards data binding, > and instead of having generic access to any schema, > prefers to create specific classes from schemas). > > So... there should be such tools, but they seem hard > to find. ;-/ > > -+ Tatu +- > > > > > > ____________________________________________________________________________________ > Sponsored Link > > Mortgage rates near 39yr lows. > $310k for $999/mo. Calculate new payment! > www.LowerMyBills.com/lre > |
From: Tatu S. <cow...@ya...> - 2006-11-19 03:47:44
|
--- Paul Tomsic <pt...@gm...> wrote: > thanks for the information. any suggestions on what > to use for this > type of information? > i tried w/ xerces, but the "xs" package of classes > contains a ton of > code, and i wasn't able to successfully do what i'm > aspiring to do . Good question. I thought I saw an announcement a while ago for something that would do it, but couldn't yet find it by googling. Xerces definitely has such a beast embedded, and Multi-Schema Validator (MSV) also must have something like that. The main problem is that they don't seem to expose it, beyond making validator objects available. Saxon XSLT processor's commercial version (SA) does have it, but it's not free. JaxME seems to have some extension (http://ws.apache.org/jaxme/xs/), labeled as "The JaxMe parser for XML Schema" which might help, but I'm not sure (it seems to be geared towards data binding, and instead of having generic access to any schema, prefers to create specific classes from schemas). So... there should be such tools, but they seem hard to find. ;-/ -+ Tatu +- ____________________________________________________________________________________ Sponsored Link Mortgage rates near 39yr lows. $310k for $999/mo. Calculate new payment! www.LowerMyBills.com/lre |
From: Tatu S. <cow...@ya...> - 2006-11-19 02:06:20
|
--- Jimmy Zhang <cra...@co...> wrote: > Interesting comments... > > A few years back when I posted to new groups about > an XML question, > I was told not to use mixed-content.... but wasn't > offered any reasons for > that... I think more accurate guideline would be to say that mixed content is good for textual markup (XHTML, DocBook), but problematic for data-oriented approach. Since VTD-XML is more geared towards latter, it probably won't be a problem that white space is by default skipped. I don't think mixed content is bad per se, just good for specific things. > how big a difference it makes to ignore the > unimportant whitespaces > for the purpose of schema validation??? I think it should never cause problems, actually... white space handling is bit murky area of xml specs, but I think that it is actually safe to ignore all-whitespace segments between (start/end) tags, when doing schema validation. It could change displaying of XHTML, and so on, but with schema (or DTD. RelaxNG), I don't think there are any constructs that would consider white space significant. -+ Tatu +- ____________________________________________________________________________________ Sponsored Link Mortgage rates near 39yr lows. $420k for $1,399/mo. Calculate new payment! www.LowerMyBills.com/lre |
From: Paul T. <pt...@gm...> - 2006-11-19 01:21:50
|
thanks for the information. any suggestions on what to use for this type of information? i tried w/ xerces, but the "xs" package of classes contains a ton of code, and i wasn't able to successfully do what i'm aspiring to do . On 11/18/06, Tatu Saloranta <cow...@ya...> wrote: > --- Paul Tomsic <pt...@gm...> wrote: > > > i need a way, if given an XML document, to determine > > if a node was > > marked as mixed=true in the schema. if it was, then > > return it's > > children nodes as text. is this possible within > > vtd? > > You'd need to check the Schema. That's something > VTD-XML is not designed to deal with. You could of > course parse schema with it, but that just gives you > InfoSet... you really need something more to give more > convenient access to schema. > > Now, if you are thinking of heuristically checking if > there happens to be any mixed content, that is bit > harder... since white space may or may not count, > depending on schema (or dtd, rng). Besides, VTD-XML > implicitly ignores some of the white space -- it'll > still be in source document contents, there just won't > be matching event (if I understand things correctly). > Most of the time this works out ok, but may be > surprising if one is used to other APIs which expose > the full infoset (white space still is part of info > set, even if most of the time is not used for > anything). > > Once you have that info (whether mixed content is > allowed), you can use VTD-XML for accessing things. > > -+ Tatu +- > > > > > > ____________________________________________________________________________________ > Sponsored Link > > Online degrees - find the right program to advance your career. > Www.nextag.com > |
From: Jimmy Z. <cra...@co...> - 2006-11-18 22:15:45
|
Interesting comments... A few years back when I posted to new groups about an XML question, I was told not to use mixed-content.... but wasn't offered any reasons for that... how big a difference it makes to ignore the unimportant whitespaces for the purpose of schema validation??? ----- Original Message ----- From: "Tatu Saloranta" <cow...@ya...> To: "Paul Tomsic" <pt...@gm...>; <vtd...@li...> Sent: Saturday, November 18, 2006 12:35 PM Subject: Re: [Vtd-xml-users] mixed content? > --- Paul Tomsic <pt...@gm...> wrote: > >> i need a way, if given an XML document, to determine >> if a node was >> marked as mixed=true in the schema. if it was, then >> return it's >> children nodes as text. is this possible within >> vtd? > > You'd need to check the Schema. That's something > VTD-XML is not designed to deal with. You could of > course parse schema with it, but that just gives you > InfoSet... you really need something more to give more > convenient access to schema. > > Now, if you are thinking of heuristically checking if > there happens to be any mixed content, that is bit > harder... since white space may or may not count, > depending on schema (or dtd, rng). Besides, VTD-XML > implicitly ignores some of the white space -- it'll > still be in source document contents, there just won't > be matching event (if I understand things correctly). > Most of the time this works out ok, but may be > surprising if one is used to other APIs which expose > the full infoset (white space still is part of info > set, even if most of the time is not used for > anything). > > Once you have that info (whether mixed content is > allowed), you can use VTD-XML for accessing things. > > -+ Tatu +- > > > > > > ____________________________________________________________________________________ > Sponsored Link > > Online degrees - find the right program to advance your career. > Www.nextag.com > > ------------------------------------------------------------------------- > 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: Tatu S. <cow...@ya...> - 2006-11-18 20:36:03
|
--- Paul Tomsic <pt...@gm...> wrote: > i need a way, if given an XML document, to determine > if a node was > marked as mixed=true in the schema. if it was, then > return it's > children nodes as text. is this possible within > vtd? You'd need to check the Schema. That's something VTD-XML is not designed to deal with. You could of course parse schema with it, but that just gives you InfoSet... you really need something more to give more convenient access to schema. Now, if you are thinking of heuristically checking if there happens to be any mixed content, that is bit harder... since white space may or may not count, depending on schema (or dtd, rng). Besides, VTD-XML implicitly ignores some of the white space -- it'll still be in source document contents, there just won't be matching event (if I understand things correctly). Most of the time this works out ok, but may be surprising if one is used to other APIs which expose the full infoset (white space still is part of info set, even if most of the time is not used for anything). Once you have that info (whether mixed content is allowed), you can use VTD-XML for accessing things. -+ Tatu +- ____________________________________________________________________________________ Sponsored Link Online degrees - find the right program to advance your career. Www.nextag.com |
From: Jimmy Z. <cra...@co...> - 2006-11-17 04:41:39
|
The following code may work... let me know... int i = vn.getCurrentIndex(); // the i is token index of cursor element int depth = vn.getTokenDepth(i); int j = i+1; StringBuffer sb = new StringBuffer(); while(j<vn.getTokenCount()){ int type = vn.getTokenType(j); int d = vn.getTokenDepth(j); if (d >= depth && type == VTDNav.TOKEN_START_TAG){ break; } if (type == VTDNav.CHARACTER_DATA || type == VTDNav.CDATA){ sb.append(vn.toString(j)); } j++; } ----- Original Message ----- From: "Paul Tomsic" <pt...@gm...> To: "Jimmy Zhang" <cra...@co...> Cc: <vtd...@li...> Sent: Thursday, November 16, 2006 5:07 AM Subject: Re: [Vtd-xml-users] mixed content? > thanks, jimmy. is there an example you might be able to point me to, > that would do something like how you suggest? > > > On 11/16/06, Jimmy Zhang <cra...@co...> wrote: >> use while to looping thru all the tokens and collect those whose >> types are character_data or cdata... and convert them to strings and >> concatnate them... >> ----- Original Message ----- >> From: "Paul Tomsic" <pt...@gm...> >> To: "Jimmy Zhang" <cra...@co...> >> Cc: <vtd...@li...> >> Sent: Wednesday, November 15, 2006 1:19 PM >> Subject: Re: [Vtd-xml-users] mixed content? >> >> >> > so how would i go about obtaining all of the contents of the "label" >> > node? >> > Suffix (the TEXT node) is a child of the "a" element which is a child >> > of the "em" element, which is a child of "label" - unless i'm missing >> > something (?) >> > >> > >> > >> > On 11/15/06, Jimmy Zhang <cra...@co...> wrote: >> >> it seems to me that 'Suffix' is not a child of label ... >> >> >> >> ----- Original Message ----- >> >> From: "Paul Tomsic" <pt...@gm...> >> >> To: "Jimmy Zhang" <cra...@co...> >> >> Cc: <vtd...@li...> >> >> Sent: Wednesday, November 15, 2006 1:00 PM >> >> Subject: Re: [Vtd-xml-users] mixed content? >> >> >> >> >> >> > hi jimmy, thanks for the reply. perhaps i'm doing something >> >> > incorrect, >> >> > though. >> >> > here's my xml snip: >> >> > <customerModules> >> >> > <name> >> >> > <suffixField> >> >> > <label> >> >> > <![CDATA[foo && <>bar]]><em><a >> >> > href="http://www.yahoo.com">Suffix</a></em> >> >> > </label> >> >> > </suffixField> >> >> > </name> >> >> > >> >> > >> >> > what'd i'd be expecting to get back is the entire contents of the >> >> > name/suffixField/label node. >> >> > >> >> > here's my code: >> >> > // _node here is a dom representation of "label" >> >> > StringBuffer tmp = new StringBuffer(); >> >> > try { >> >> > // converts a w3c node to a byte[] >> >> > b = DOMUtil.toByteArray(_node); >> >> > vg.setDoc_BR(b); >> >> > vg.parse(true); >> >> > VTDNav vn = vg.getNav(); >> >> > >> >> > ap.bind(vn); >> >> > TextIter ti = new TextIter(); >> >> > ti.touch(vn); >> >> > int i; >> >> > while ((i = ti.getNext()) != -1) { >> >> > tmp.append(vn.toString(i)); >> >> > } >> >> > >> >> > the results i'm getting back (what's in the string buffer above) is: >> >> > "foo && <>bar" >> >> > it didn't seem to pick up the 'em' and the 'a href' contents >> >> > >> >> > thoughts? >> >> > >> >> > On 11/15/06, Jimmy Zhang <cra...@co...> wrote: >> >> >> I have a quick correction... >> >> >> >> >> >> The basic syntax is as follows >> >> >> >> >> >> // assuming vn is an instance of VTDNav >> >> >> ti = new textIter(); // textIterator instantiation >> >> >> ti.touch(vn); // bind the cursor to the cursor element >> >> >> while( (int i= ti.getNext())!= -1){ >> >> >> // i is the text node associated with the element at the cursor >> >> >> //position >> >> >> system.out.println("text node is ==> "+vn.toString(i)); >> >> >> } >> >> >> >> >> >> >> >> >> ----- Original Message ----- >> >> >> From: "Jimmy Zhang" <cra...@co...> >> >> >> To: "Paul Tomsic" <pt...@gm...>; >> >> >> <vtd...@li...> >> >> >> Sent: Wednesday, November 15, 2006 10:34 AM >> >> >> Subject: Re: [Vtd-xml-users] mixed content? >> >> >> >> >> >> >> >> >> > Yes, it is possible, there is a little mentioned class called >> >> >> > textIterator >> >> >> > that you can use for that purpose.. >> >> >> > >> >> >> > if there are more than one child text node for a given element, >> >> >> > it >> >> >> > is >> >> >> > implicitly mixed content.... >> >> >> > >> >> >> > The basic syntax is as follows >> >> >> > // assuming vn is an instance of VTDNav >> >> >> > ti = new textIter(vn); >> >> >> > while( (int i= ti.getNext())!= -1){ >> >> >> > // i is the text node associated with the element at the >> >> >> > cursor >> >> >> > //position >> >> >> > system.out.println("text node is ==> "+vn.toString(i)); >> >> >> > } >> >> >> > >> >> >> > >> >> >> > ----- Original Message ----- >> >> >> > From: "Paul Tomsic" <pt...@gm...> >> >> >> > To: <vtd...@li...> >> >> >> > Sent: Wednesday, November 15, 2006 7:56 AM >> >> >> > Subject: [Vtd-xml-users] mixed content? >> >> >> > >> >> >> > >> >> >> >>i need a way, if given an XML document, to determine if a node >> >> >> >>was >> >> >> >> marked as mixed=true in the schema. if it was, then return it's >> >> >> >> children nodes as text. is this possible within vtd? >> >> >> >> >> >> >> >> The reason for this is b/c we've got "rich text" or "html" in >> >> >> >> XML >> >> >> >> documents, and need a way to determine what is a child node, and >> >> >> >> what's intended to be html. >> >> >> >> >> >> >> >> Something like >> >> >> >> >> >> >> >> <foo><em>emphasis</em> and some <b>bold</b> text as well</foo> >> >> >> >> >> >> >> >> So <foo> would be marked as mixed=true, then i'd return the >> >> >> >> contents >> >> >> >> between the foo elements. >> >> >> >> >> >> >> >> is there a better/more standard way to do this (short of marking >> >> >> >> it >> >> >> >> all as CDATA) ? >> >> >> >> >> >> >> >> i can't seem to find a decent way to do what i'm trying to do. >> >> >> >> thanks >> >> >> >> >> >> >> >> ------------------------------------------------------------------------- >> >> >> >> 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 >> >> >> >> >> >> >> > >> >> >> > >> >> >> > >> >> >> > ------------------------------------------------------------------------- >> >> >> > 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: Paul T. <pt...@gm...> - 2006-11-16 13:07:57
|
thanks, jimmy. is there an example you might be able to point me to, that would do something like how you suggest? On 11/16/06, Jimmy Zhang <cra...@co...> wrote: > use while to looping thru all the tokens and collect those whose > types are character_data or cdata... and convert them to strings and > concatnate them... > ----- Original Message ----- > From: "Paul Tomsic" <pt...@gm...> > To: "Jimmy Zhang" <cra...@co...> > Cc: <vtd...@li...> > Sent: Wednesday, November 15, 2006 1:19 PM > Subject: Re: [Vtd-xml-users] mixed content? > > > > so how would i go about obtaining all of the contents of the "label" node? > > Suffix (the TEXT node) is a child of the "a" element which is a child > > of the "em" element, which is a child of "label" - unless i'm missing > > something (?) > > > > > > > > On 11/15/06, Jimmy Zhang <cra...@co...> wrote: > >> it seems to me that 'Suffix' is not a child of label ... > >> > >> ----- Original Message ----- > >> From: "Paul Tomsic" <pt...@gm...> > >> To: "Jimmy Zhang" <cra...@co...> > >> Cc: <vtd...@li...> > >> Sent: Wednesday, November 15, 2006 1:00 PM > >> Subject: Re: [Vtd-xml-users] mixed content? > >> > >> > >> > hi jimmy, thanks for the reply. perhaps i'm doing something incorrect, > >> > though. > >> > here's my xml snip: > >> > <customerModules> > >> > <name> > >> > <suffixField> > >> > <label> > >> > <![CDATA[foo && <>bar]]><em><a > >> > href="http://www.yahoo.com">Suffix</a></em> > >> > </label> > >> > </suffixField> > >> > </name> > >> > > >> > > >> > what'd i'd be expecting to get back is the entire contents of the > >> > name/suffixField/label node. > >> > > >> > here's my code: > >> > // _node here is a dom representation of "label" > >> > StringBuffer tmp = new StringBuffer(); > >> > try { > >> > // converts a w3c node to a byte[] > >> > b = DOMUtil.toByteArray(_node); > >> > vg.setDoc_BR(b); > >> > vg.parse(true); > >> > VTDNav vn = vg.getNav(); > >> > > >> > ap.bind(vn); > >> > TextIter ti = new TextIter(); > >> > ti.touch(vn); > >> > int i; > >> > while ((i = ti.getNext()) != -1) { > >> > tmp.append(vn.toString(i)); > >> > } > >> > > >> > the results i'm getting back (what's in the string buffer above) is: > >> > "foo && <>bar" > >> > it didn't seem to pick up the 'em' and the 'a href' contents > >> > > >> > thoughts? > >> > > >> > On 11/15/06, Jimmy Zhang <cra...@co...> wrote: > >> >> I have a quick correction... > >> >> > >> >> The basic syntax is as follows > >> >> > >> >> // assuming vn is an instance of VTDNav > >> >> ti = new textIter(); // textIterator instantiation > >> >> ti.touch(vn); // bind the cursor to the cursor element > >> >> while( (int i= ti.getNext())!= -1){ > >> >> // i is the text node associated with the element at the cursor > >> >> //position > >> >> system.out.println("text node is ==> "+vn.toString(i)); > >> >> } > >> >> > >> >> > >> >> ----- Original Message ----- > >> >> From: "Jimmy Zhang" <cra...@co...> > >> >> To: "Paul Tomsic" <pt...@gm...>; > >> >> <vtd...@li...> > >> >> Sent: Wednesday, November 15, 2006 10:34 AM > >> >> Subject: Re: [Vtd-xml-users] mixed content? > >> >> > >> >> > >> >> > Yes, it is possible, there is a little mentioned class called > >> >> > textIterator > >> >> > that you can use for that purpose.. > >> >> > > >> >> > if there are more than one child text node for a given element, it > >> >> > is > >> >> > implicitly mixed content.... > >> >> > > >> >> > The basic syntax is as follows > >> >> > // assuming vn is an instance of VTDNav > >> >> > ti = new textIter(vn); > >> >> > while( (int i= ti.getNext())!= -1){ > >> >> > // i is the text node associated with the element at the cursor > >> >> > //position > >> >> > system.out.println("text node is ==> "+vn.toString(i)); > >> >> > } > >> >> > > >> >> > > >> >> > ----- Original Message ----- > >> >> > From: "Paul Tomsic" <pt...@gm...> > >> >> > To: <vtd...@li...> > >> >> > Sent: Wednesday, November 15, 2006 7:56 AM > >> >> > Subject: [Vtd-xml-users] mixed content? > >> >> > > >> >> > > >> >> >>i need a way, if given an XML document, to determine if a node was > >> >> >> marked as mixed=true in the schema. if it was, then return it's > >> >> >> children nodes as text. is this possible within vtd? > >> >> >> > >> >> >> The reason for this is b/c we've got "rich text" or "html" in XML > >> >> >> documents, and need a way to determine what is a child node, and > >> >> >> what's intended to be html. > >> >> >> > >> >> >> Something like > >> >> >> > >> >> >> <foo><em>emphasis</em> and some <b>bold</b> text as well</foo> > >> >> >> > >> >> >> So <foo> would be marked as mixed=true, then i'd return the > >> >> >> contents > >> >> >> between the foo elements. > >> >> >> > >> >> >> is there a better/more standard way to do this (short of marking it > >> >> >> all as CDATA) ? > >> >> >> > >> >> >> i can't seem to find a decent way to do what i'm trying to do. > >> >> >> thanks > >> >> >> > >> >> >> ------------------------------------------------------------------------- > >> >> >> 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 > >> >> >> > >> >> > > >> >> > > >> >> > > >> >> > ------------------------------------------------------------------------- > >> >> > 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-11-16 08:19:20
|
use while to looping thru all the tokens and collect those whose types are character_data or cdata... and convert them to strings and concatnate them... ----- Original Message ----- From: "Paul Tomsic" <pt...@gm...> To: "Jimmy Zhang" <cra...@co...> Cc: <vtd...@li...> Sent: Wednesday, November 15, 2006 1:19 PM Subject: Re: [Vtd-xml-users] mixed content? > so how would i go about obtaining all of the contents of the "label" node? > Suffix (the TEXT node) is a child of the "a" element which is a child > of the "em" element, which is a child of "label" - unless i'm missing > something (?) > > > > On 11/15/06, Jimmy Zhang <cra...@co...> wrote: >> it seems to me that 'Suffix' is not a child of label ... >> >> ----- Original Message ----- >> From: "Paul Tomsic" <pt...@gm...> >> To: "Jimmy Zhang" <cra...@co...> >> Cc: <vtd...@li...> >> Sent: Wednesday, November 15, 2006 1:00 PM >> Subject: Re: [Vtd-xml-users] mixed content? >> >> >> > hi jimmy, thanks for the reply. perhaps i'm doing something incorrect, >> > though. >> > here's my xml snip: >> > <customerModules> >> > <name> >> > <suffixField> >> > <label> >> > <![CDATA[foo && <>bar]]><em><a >> > href="http://www.yahoo.com">Suffix</a></em> >> > </label> >> > </suffixField> >> > </name> >> > >> > >> > what'd i'd be expecting to get back is the entire contents of the >> > name/suffixField/label node. >> > >> > here's my code: >> > // _node here is a dom representation of "label" >> > StringBuffer tmp = new StringBuffer(); >> > try { >> > // converts a w3c node to a byte[] >> > b = DOMUtil.toByteArray(_node); >> > vg.setDoc_BR(b); >> > vg.parse(true); >> > VTDNav vn = vg.getNav(); >> > >> > ap.bind(vn); >> > TextIter ti = new TextIter(); >> > ti.touch(vn); >> > int i; >> > while ((i = ti.getNext()) != -1) { >> > tmp.append(vn.toString(i)); >> > } >> > >> > the results i'm getting back (what's in the string buffer above) is: >> > "foo && <>bar" >> > it didn't seem to pick up the 'em' and the 'a href' contents >> > >> > thoughts? >> > >> > On 11/15/06, Jimmy Zhang <cra...@co...> wrote: >> >> I have a quick correction... >> >> >> >> The basic syntax is as follows >> >> >> >> // assuming vn is an instance of VTDNav >> >> ti = new textIter(); // textIterator instantiation >> >> ti.touch(vn); // bind the cursor to the cursor element >> >> while( (int i= ti.getNext())!= -1){ >> >> // i is the text node associated with the element at the cursor >> >> //position >> >> system.out.println("text node is ==> "+vn.toString(i)); >> >> } >> >> >> >> >> >> ----- Original Message ----- >> >> From: "Jimmy Zhang" <cra...@co...> >> >> To: "Paul Tomsic" <pt...@gm...>; >> >> <vtd...@li...> >> >> Sent: Wednesday, November 15, 2006 10:34 AM >> >> Subject: Re: [Vtd-xml-users] mixed content? >> >> >> >> >> >> > Yes, it is possible, there is a little mentioned class called >> >> > textIterator >> >> > that you can use for that purpose.. >> >> > >> >> > if there are more than one child text node for a given element, it >> >> > is >> >> > implicitly mixed content.... >> >> > >> >> > The basic syntax is as follows >> >> > // assuming vn is an instance of VTDNav >> >> > ti = new textIter(vn); >> >> > while( (int i= ti.getNext())!= -1){ >> >> > // i is the text node associated with the element at the cursor >> >> > //position >> >> > system.out.println("text node is ==> "+vn.toString(i)); >> >> > } >> >> > >> >> > >> >> > ----- Original Message ----- >> >> > From: "Paul Tomsic" <pt...@gm...> >> >> > To: <vtd...@li...> >> >> > Sent: Wednesday, November 15, 2006 7:56 AM >> >> > Subject: [Vtd-xml-users] mixed content? >> >> > >> >> > >> >> >>i need a way, if given an XML document, to determine if a node was >> >> >> marked as mixed=true in the schema. if it was, then return it's >> >> >> children nodes as text. is this possible within vtd? >> >> >> >> >> >> The reason for this is b/c we've got "rich text" or "html" in XML >> >> >> documents, and need a way to determine what is a child node, and >> >> >> what's intended to be html. >> >> >> >> >> >> Something like >> >> >> >> >> >> <foo><em>emphasis</em> and some <b>bold</b> text as well</foo> >> >> >> >> >> >> So <foo> would be marked as mixed=true, then i'd return the >> >> >> contents >> >> >> between the foo elements. >> >> >> >> >> >> is there a better/more standard way to do this (short of marking it >> >> >> all as CDATA) ? >> >> >> >> >> >> i can't seem to find a decent way to do what i'm trying to do. >> >> >> thanks >> >> >> >> >> >> ------------------------------------------------------------------------- >> >> >> 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 >> >> >> >> >> > >> >> > >> >> > >> >> > ------------------------------------------------------------------------- >> >> > 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: Paul T. <pt...@gm...> - 2006-11-15 21:20:03
|
so how would i go about obtaining all of the contents of the "label" node? Suffix (the TEXT node) is a child of the "a" element which is a child of the "em" element, which is a child of "label" - unless i'm missing something (?) On 11/15/06, Jimmy Zhang <cra...@co...> wrote: > it seems to me that 'Suffix' is not a child of label ... > > ----- Original Message ----- > From: "Paul Tomsic" <pt...@gm...> > To: "Jimmy Zhang" <cra...@co...> > Cc: <vtd...@li...> > Sent: Wednesday, November 15, 2006 1:00 PM > Subject: Re: [Vtd-xml-users] mixed content? > > > > hi jimmy, thanks for the reply. perhaps i'm doing something incorrect, > > though. > > here's my xml snip: > > <customerModules> > > <name> > > <suffixField> > > <label> > > <![CDATA[foo && <>bar]]><em><a > > href="http://www.yahoo.com">Suffix</a></em> > > </label> > > </suffixField> > > </name> > > > > > > what'd i'd be expecting to get back is the entire contents of the > > name/suffixField/label node. > > > > here's my code: > > // _node here is a dom representation of "label" > > StringBuffer tmp = new StringBuffer(); > > try { > > // converts a w3c node to a byte[] > > b = DOMUtil.toByteArray(_node); > > vg.setDoc_BR(b); > > vg.parse(true); > > VTDNav vn = vg.getNav(); > > > > ap.bind(vn); > > TextIter ti = new TextIter(); > > ti.touch(vn); > > int i; > > while ((i = ti.getNext()) != -1) { > > tmp.append(vn.toString(i)); > > } > > > > the results i'm getting back (what's in the string buffer above) is: > > "foo && <>bar" > > it didn't seem to pick up the 'em' and the 'a href' contents > > > > thoughts? > > > > On 11/15/06, Jimmy Zhang <cra...@co...> wrote: > >> I have a quick correction... > >> > >> The basic syntax is as follows > >> > >> // assuming vn is an instance of VTDNav > >> ti = new textIter(); // textIterator instantiation > >> ti.touch(vn); // bind the cursor to the cursor element > >> while( (int i= ti.getNext())!= -1){ > >> // i is the text node associated with the element at the cursor > >> //position > >> system.out.println("text node is ==> "+vn.toString(i)); > >> } > >> > >> > >> ----- Original Message ----- > >> From: "Jimmy Zhang" <cra...@co...> > >> To: "Paul Tomsic" <pt...@gm...>; > >> <vtd...@li...> > >> Sent: Wednesday, November 15, 2006 10:34 AM > >> Subject: Re: [Vtd-xml-users] mixed content? > >> > >> > >> > Yes, it is possible, there is a little mentioned class called > >> > textIterator > >> > that you can use for that purpose.. > >> > > >> > if there are more than one child text node for a given element, it is > >> > implicitly mixed content.... > >> > > >> > The basic syntax is as follows > >> > // assuming vn is an instance of VTDNav > >> > ti = new textIter(vn); > >> > while( (int i= ti.getNext())!= -1){ > >> > // i is the text node associated with the element at the cursor > >> > //position > >> > system.out.println("text node is ==> "+vn.toString(i)); > >> > } > >> > > >> > > >> > ----- Original Message ----- > >> > From: "Paul Tomsic" <pt...@gm...> > >> > To: <vtd...@li...> > >> > Sent: Wednesday, November 15, 2006 7:56 AM > >> > Subject: [Vtd-xml-users] mixed content? > >> > > >> > > >> >>i need a way, if given an XML document, to determine if a node was > >> >> marked as mixed=true in the schema. if it was, then return it's > >> >> children nodes as text. is this possible within vtd? > >> >> > >> >> The reason for this is b/c we've got "rich text" or "html" in XML > >> >> documents, and need a way to determine what is a child node, and > >> >> what's intended to be html. > >> >> > >> >> Something like > >> >> > >> >> <foo><em>emphasis</em> and some <b>bold</b> text as well</foo> > >> >> > >> >> So <foo> would be marked as mixed=true, then i'd return the contents > >> >> between the foo elements. > >> >> > >> >> is there a better/more standard way to do this (short of marking it > >> >> all as CDATA) ? > >> >> > >> >> i can't seem to find a decent way to do what i'm trying to do. > >> >> thanks > >> >> > >> >> ------------------------------------------------------------------------- > >> >> 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 > >> >> > >> > > >> > > >> > > >> > ------------------------------------------------------------------------- > >> > 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-11-15 21:15:13
|
it seems to me that 'Suffix' is not a child of label ... ----- Original Message ----- From: "Paul Tomsic" <pt...@gm...> To: "Jimmy Zhang" <cra...@co...> Cc: <vtd...@li...> Sent: Wednesday, November 15, 2006 1:00 PM Subject: Re: [Vtd-xml-users] mixed content? > hi jimmy, thanks for the reply. perhaps i'm doing something incorrect, > though. > here's my xml snip: > <customerModules> > <name> > <suffixField> > <label> > <![CDATA[foo && <>bar]]><em><a > href="http://www.yahoo.com">Suffix</a></em> > </label> > </suffixField> > </name> > > > what'd i'd be expecting to get back is the entire contents of the > name/suffixField/label node. > > here's my code: > // _node here is a dom representation of "label" > StringBuffer tmp = new StringBuffer(); > try { > // converts a w3c node to a byte[] > b = DOMUtil.toByteArray(_node); > vg.setDoc_BR(b); > vg.parse(true); > VTDNav vn = vg.getNav(); > > ap.bind(vn); > TextIter ti = new TextIter(); > ti.touch(vn); > int i; > while ((i = ti.getNext()) != -1) { > tmp.append(vn.toString(i)); > } > > the results i'm getting back (what's in the string buffer above) is: > "foo && <>bar" > it didn't seem to pick up the 'em' and the 'a href' contents > > thoughts? > > On 11/15/06, Jimmy Zhang <cra...@co...> wrote: >> I have a quick correction... >> >> The basic syntax is as follows >> >> // assuming vn is an instance of VTDNav >> ti = new textIter(); // textIterator instantiation >> ti.touch(vn); // bind the cursor to the cursor element >> while( (int i= ti.getNext())!= -1){ >> // i is the text node associated with the element at the cursor >> //position >> system.out.println("text node is ==> "+vn.toString(i)); >> } >> >> >> ----- Original Message ----- >> From: "Jimmy Zhang" <cra...@co...> >> To: "Paul Tomsic" <pt...@gm...>; >> <vtd...@li...> >> Sent: Wednesday, November 15, 2006 10:34 AM >> Subject: Re: [Vtd-xml-users] mixed content? >> >> >> > Yes, it is possible, there is a little mentioned class called >> > textIterator >> > that you can use for that purpose.. >> > >> > if there are more than one child text node for a given element, it is >> > implicitly mixed content.... >> > >> > The basic syntax is as follows >> > // assuming vn is an instance of VTDNav >> > ti = new textIter(vn); >> > while( (int i= ti.getNext())!= -1){ >> > // i is the text node associated with the element at the cursor >> > //position >> > system.out.println("text node is ==> "+vn.toString(i)); >> > } >> > >> > >> > ----- Original Message ----- >> > From: "Paul Tomsic" <pt...@gm...> >> > To: <vtd...@li...> >> > Sent: Wednesday, November 15, 2006 7:56 AM >> > Subject: [Vtd-xml-users] mixed content? >> > >> > >> >>i need a way, if given an XML document, to determine if a node was >> >> marked as mixed=true in the schema. if it was, then return it's >> >> children nodes as text. is this possible within vtd? >> >> >> >> The reason for this is b/c we've got "rich text" or "html" in XML >> >> documents, and need a way to determine what is a child node, and >> >> what's intended to be html. >> >> >> >> Something like >> >> >> >> <foo><em>emphasis</em> and some <b>bold</b> text as well</foo> >> >> >> >> So <foo> would be marked as mixed=true, then i'd return the contents >> >> between the foo elements. >> >> >> >> is there a better/more standard way to do this (short of marking it >> >> all as CDATA) ? >> >> >> >> i can't seem to find a decent way to do what i'm trying to do. >> >> thanks >> >> >> >> ------------------------------------------------------------------------- >> >> 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 >> >> >> > >> > >> > >> > ------------------------------------------------------------------------- >> > 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: Paul T. <pt...@gm...> - 2006-11-15 21:01:02
|
hi jimmy, thanks for the reply. perhaps i'm doing something incorrect, though. here's my xml snip: <customerModules> <name> <suffixField> <label> <![CDATA[foo && <>bar]]><em><a href="http://www.yahoo.com">Suffix</a></em> </label> </suffixField> </name> what'd i'd be expecting to get back is the entire contents of the name/suffixField/label node. here's my code: // _node here is a dom representation of "label" StringBuffer tmp = new StringBuffer(); try { // converts a w3c node to a byte[] b = DOMUtil.toByteArray(_node); vg.setDoc_BR(b); vg.parse(true); VTDNav vn = vg.getNav(); ap.bind(vn); TextIter ti = new TextIter(); ti.touch(vn); int i; while ((i = ti.getNext()) != -1) { tmp.append(vn.toString(i)); } the results i'm getting back (what's in the string buffer above) is: "foo && <>bar" it didn't seem to pick up the 'em' and the 'a href' contents thoughts? On 11/15/06, Jimmy Zhang <cra...@co...> wrote: > I have a quick correction... > > The basic syntax is as follows > > // assuming vn is an instance of VTDNav > ti = new textIter(); // textIterator instantiation > ti.touch(vn); // bind the cursor to the cursor element > while( (int i= ti.getNext())!= -1){ > // i is the text node associated with the element at the cursor > //position > system.out.println("text node is ==> "+vn.toString(i)); > } > > > ----- Original Message ----- > From: "Jimmy Zhang" <cra...@co...> > To: "Paul Tomsic" <pt...@gm...>; <vtd...@li...> > Sent: Wednesday, November 15, 2006 10:34 AM > Subject: Re: [Vtd-xml-users] mixed content? > > > > Yes, it is possible, there is a little mentioned class called textIterator > > that you can use for that purpose.. > > > > if there are more than one child text node for a given element, it is > > implicitly mixed content.... > > > > The basic syntax is as follows > > // assuming vn is an instance of VTDNav > > ti = new textIter(vn); > > while( (int i= ti.getNext())!= -1){ > > // i is the text node associated with the element at the cursor > > //position > > system.out.println("text node is ==> "+vn.toString(i)); > > } > > > > > > ----- Original Message ----- > > From: "Paul Tomsic" <pt...@gm...> > > To: <vtd...@li...> > > Sent: Wednesday, November 15, 2006 7:56 AM > > Subject: [Vtd-xml-users] mixed content? > > > > > >>i need a way, if given an XML document, to determine if a node was > >> marked as mixed=true in the schema. if it was, then return it's > >> children nodes as text. is this possible within vtd? > >> > >> The reason for this is b/c we've got "rich text" or "html" in XML > >> documents, and need a way to determine what is a child node, and > >> what's intended to be html. > >> > >> Something like > >> > >> <foo><em>emphasis</em> and some <b>bold</b> text as well</foo> > >> > >> So <foo> would be marked as mixed=true, then i'd return the contents > >> between the foo elements. > >> > >> is there a better/more standard way to do this (short of marking it > >> all as CDATA) ? > >> > >> i can't seem to find a decent way to do what i'm trying to do. > >> thanks > >> > >> ------------------------------------------------------------------------- > >> 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 > >> > > > > > > > > ------------------------------------------------------------------------- > > 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-11-15 18:39:51
|
I have a quick correction... The basic syntax is as follows // assuming vn is an instance of VTDNav ti = new textIter(); // textIterator instantiation ti.touch(vn); // bind the cursor to the cursor element while( (int i= ti.getNext())!= -1){ // i is the text node associated with the element at the cursor //position system.out.println("text node is ==> "+vn.toString(i)); } ----- Original Message ----- From: "Jimmy Zhang" <cra...@co...> To: "Paul Tomsic" <pt...@gm...>; <vtd...@li...> Sent: Wednesday, November 15, 2006 10:34 AM Subject: Re: [Vtd-xml-users] mixed content? > Yes, it is possible, there is a little mentioned class called textIterator > that you can use for that purpose.. > > if there are more than one child text node for a given element, it is > implicitly mixed content.... > > The basic syntax is as follows > // assuming vn is an instance of VTDNav > ti = new textIter(vn); > while( (int i= ti.getNext())!= -1){ > // i is the text node associated with the element at the cursor > //position > system.out.println("text node is ==> "+vn.toString(i)); > } > > > ----- Original Message ----- > From: "Paul Tomsic" <pt...@gm...> > To: <vtd...@li...> > Sent: Wednesday, November 15, 2006 7:56 AM > Subject: [Vtd-xml-users] mixed content? > > >>i need a way, if given an XML document, to determine if a node was >> marked as mixed=true in the schema. if it was, then return it's >> children nodes as text. is this possible within vtd? >> >> The reason for this is b/c we've got "rich text" or "html" in XML >> documents, and need a way to determine what is a child node, and >> what's intended to be html. >> >> Something like >> >> <foo><em>emphasis</em> and some <b>bold</b> text as well</foo> >> >> So <foo> would be marked as mixed=true, then i'd return the contents >> between the foo elements. >> >> is there a better/more standard way to do this (short of marking it >> all as CDATA) ? >> >> i can't seem to find a decent way to do what i'm trying to do. >> thanks >> >> ------------------------------------------------------------------------- >> 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 >> > > > > ------------------------------------------------------------------------- > 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-11-15 18:35:18
|
Yes, it is possible, there is a little mentioned class called textIterator that you can use for that purpose.. if there are more than one child text node for a given element, it is implicitly mixed content.... The basic syntax is as follows // assuming vn is an instance of VTDNav ti = new textIter(vn); while( (int i= ti.getNext())!= -1){ // i is the text node associated with the element at the cursor //position system.out.println("text node is ==> "+vn.toString(i)); } ----- Original Message ----- From: "Paul Tomsic" <pt...@gm...> To: <vtd...@li...> Sent: Wednesday, November 15, 2006 7:56 AM Subject: [Vtd-xml-users] mixed content? >i need a way, if given an XML document, to determine if a node was > marked as mixed=true in the schema. if it was, then return it's > children nodes as text. is this possible within vtd? > > The reason for this is b/c we've got "rich text" or "html" in XML > documents, and need a way to determine what is a child node, and > what's intended to be html. > > Something like > > <foo><em>emphasis</em> and some <b>bold</b> text as well</foo> > > So <foo> would be marked as mixed=true, then i'd return the contents > between the foo elements. > > is there a better/more standard way to do this (short of marking it > all as CDATA) ? > > i can't seem to find a decent way to do what i'm trying to do. > thanks > > ------------------------------------------------------------------------- > 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: Paul T. <pt...@gm...> - 2006-11-15 15:57:15
|
i need a way, if given an XML document, to determine if a node was marked as mixed=true in the schema. if it was, then return it's children nodes as text. is this possible within vtd? The reason for this is b/c we've got "rich text" or "html" in XML documents, and need a way to determine what is a child node, and what's intended to be html. Something like <foo><em>emphasis</em> and some <b>bold</b> text as well</foo> So <foo> would be marked as mixed=true, then i'd return the contents between the foo elements. is there a better/more standard way to do this (short of marking it all as CDATA) ? i can't seem to find a decent way to do what i'm trying to do. thanks |