正在处理gd:organization,特别是gd:orgName?和gd: orgTitle


Struggling with gd:organization, specifically gd:orgName? and gd:orgTitle?

使用Google Contacts API推送和提取联系人数据有困难,特别是因为它涉及到组织名称和组织标题。

下面是我发送的示例:

<atom:entry xmlns:atom='http://www.w3.org/2005/Atom'
                                xmlns:gd='http://schemas.google.com/g/2005'
                                xmlns:gContact='http://schemas.google.com/contact/2008'>
                                <atom:category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>
                                <id>http://www.google.com/m8/feeds/contacts/devteam@zeppidy.com/base/795eba52880dd744</id>

                              <gd:name>
                                 <gd:givenName>Amy</gd:givenName>
                                 <gd:familyName>Larsson</gd:familyName>
                                 <gd:fullName>Amy Larsson</gd:fullName>
                              </gd:name>
                              <atom:content type='text'></atom:content>
                                <gd:email rel='http://schemas.google.com/g/2005#work' address='email'/>
                                <gd:phoneNumber rel='http://schemas.google.com/g/2005#home'>0</gd:phoneNumber>
                                <gd:structuredPostalAddress rel='http://schemas.google.com/g/2005#work'>
                                <gd:city>Lake Oswego</gd:city>

                                <gd:formattedAddress>
                                  330 Oak Lake Oswego,  - State -  
                                </gd:formattedAddress>
                              </gd:structuredPostalAddress>
                                <gd:organization label='Work' primary='true'/>
                            <gd:orgName>test c</gd:orgName>
                            <gd:orgTitle>test tt3</gd:orgTitle>                            
                        </gd:organization>
                             <gContact:groupMembershipInfo deleted='false' href='http://www.google.com/m8/feeds/groups/devteam@zeppidy.com/base/1e8391f408b028e1'/>
                            </atom:entry>

当我删除以下组织信息时,一切正常:

<gd:organization label='Work' primary='true'/>
<gd:orgName>test c</gd:orgName>
<gd:orgTitle>test tt3</gd:orgTitle>                            
</gd:organization>

建议吗?谢谢你!

<gd:organization label='Work' primary='true'/>

这个标签本身是关闭的。最后不需要</gd:organization>。在您的情况下,您可能希望删除第一行的/