[Cosmo-dev] VCard Parsing in Cosmo

Vinubalaji Gopal vinu at osafoundation.org
Tue Jul 18 13:10:30 PDT 2006


On Tue, 2006-07-18 at 11:28 -0700, Brian Moseley wrote:
> see section 5.3 of the carddav draft:
> 
>    "vCard object resources contained in address book collections MUST
>    contain a single VCARD component only.
> 
>    vCard components in an address book collection MUST have a UID
>    property value that MUST be unique in the scope of the address book
>    collection, and all its descendant collections, in which the vCard
>    object resource is contained."
Was confused with the terminology in the carddav spec, now that I see it
in the carddav spec I will throw an exception for those kind of vcf
files :). 


> this sounds dangerous. my impression is that the vcard4j dom is an
> internal data structure that is not meant to be accessed by clients.
No the dom structure is provided by the API and the example application provided with the 
API shows on how to dump the XML file. The extra thing I am doing here is parsing the XML file. 


> why can you not simply iterate through the list of Types that is
> returned by VCard.getTypes()?
Would be good for a normal application but for the flattener, it will
not be efficient and hard to implement. I am still exploring on
implementing it this way.



More information about the cosmo-dev mailing list