admin管理员组文章数量:1310272
My goal is to read an exported google-contacts file containing the contacts in vcf-format and store the contacts in my own contacts table (in SQL Server). I have dedicated columns for Spouse (string), and Children (string[]).
I use the converter of Folker Kinzel (FolkerKinzel.VCards), which is very extensive. Each contact has fields with the name of father, mother or spouse. That field is defined by a label.
The export file structure is as follows
BEGIN:VCARD
VERSION:3.0
FN:Dr. William Nicoloas Henry DeCamp MD
N:DeCamp;William;Nicoloas Henry;Dr.;MD
EMAIL;TYPE=INTERNET;TYPE=HOME:[email protected]
EMAIL;TYPE=INTERNET;TYPE=WORK:[email protected]
EMAIL;TYPE=INTERNET:[email protected]
TEL;TYPE=CELL:9654324937
TEL:698765432
ADR;TYPE=HOME:;;10 Whitechapel rd.;Whiteplains;;NY0011;USA;WhiteChapelroad\nNY0011 Whiteplains\nUSA
ORG:ACME Corp
TITLE:Manager
BDAY:19860629
item1.X-ABRELATEDNAMES:Gee
item1.X-ABLabel:_$!<Father>!$_
item2.X-ABRELATEDNAMES:Lisa
item2.X-ABLabel:_$!<Mother>!$_
item3.X-ABRELATEDNAMES:Kerry
item3.X-ABLabel:_$!<Partner>!$_
item4.X-ABRELATEDNAMES:Jaimy
item4.X-ABLabel:_$!<Child>!$_
NOTE:QmId: 3088
CATEGORIES:myContacts
END:VCARD
However, when reading the converted file, the X-ABRELATEDNAMES
and the X-ABLABEL
have become separate items, as shown here:
The Group (item1...item3) is a property of each AB-element.
Can you recommend a way to use that property to allocate the right name to the right label again?
For example
var item1 = (item1.label, item1.value)
I have tried to find a way in FolkerKinzel to get the order changed around (item1{ABLABEL, ABRELATEDDNAMES}
), but I could not find a way.
本文标签: cHow to read a Google Contact vcffile and converting nonstandard items to a listStack Overflow
版权声明:本文标题:c# - How to read a Google Contact vcf-file and converting non-standard items to a list - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741840973a2400497.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论