[Cosmo-dev] VCard Parsing in Cosmo

Vinubalaji Gopal vinu at osafoundation.org
Wed Jul 19 13:47:01 PDT 2006


On Wed, 2006-07-19 at 13:19 -0700, Brian Moseley wrote:

> i don't understand what you mean by "just use the original vcard".
The vcard that is passed as input to the parser (FileInputStream in this case). I 
wanted an entire view of the vcard stored as a String object or something better (just for the flattener). 
I believe the CalendarBuilder does something like this, but is more flexible because it does not 
have any DOM associated with it?

I know storing another String object would cause more of a memory issue
and that is the reason for starting this discussion!

> are you saying that you would throw away vcard4j's parser and write
> your own parser?
No, I was suggesting that just for the flattener - use the parser to
validate the vcard and then instead of reconstructing the key/value
pairs from the DOM use the original vcard that was passed as an input to
the parser (the FileInputStream or rather change it to a StringReader or
something more appropriate).


On a side note: I have the DOM XPath queries working, but I have to
ensure that it works with all the types in the VCard. 




More information about the cosmo-dev mailing list