Hi Vipul:
Thank you.
(2) What determines my own TAG name in the XML as the tag name <recipient /> if my schema is "bfwechat:wechatAccounts"
I used "wechatAccounts", but it is error when run the JavaScript Code.
<recipient xtkschema="nms:recipient" email="john.doe@adobe.com" birthDate="1956/05/04" folder-id=1203 _key="@email, [@folder-id]"> <location city="Newton"/></recipient>
My schema:
<srcSchema _cs="WechatAccounts (bfwechat)" created="2017-04-24 06:17:19.323Z" createdBy-id="0"
desc="Accounts of Wechat" entitySchema="xtk:srcSchema" img="gzx:weicdhat.png"
label="WechatAccounts" labelSingular="WechatAccount" lastModified="2017-05-04 05:36:02.849Z"
mappingType="sql" md5="4BE35B360DF0DCC5F28E7A53C2D04E11" modifiedBy-id="0"
name="wechatAccounts" namespace="bfwechat" xtkschema="xtk:srcSchema">
<createdBy _cs="lizhigang (zhigang.li@bluefocus.com)"/>
<modifiedBy _cs="lizhigang (zhigang.li@bluefocus.com)"/>
<enumeration basetype="string" name="wechatAccountType">
<value label="Subscription" name="subscription"/>
<value label="Service" name="service"/>
</enumeration>
<element desc="Accounts of Wechat" img="gzx:weicdhat.png" label="WechatAccounts"
labelSingular="WechatAccount" name="wechatAccounts">
<key internal="true" name="accountId">
<keyfield xpath="@accountId"/>
</key>
<attribute label="Id" name="accountId" type="string"/>
<attribute enum="wechatAccountType" label="Type" name="accountType" type="string"/>
<attribute label="Name" name="accountName" type="string"/>
<compute-string expr="@accountType + ' ' + @accountName"/>
</element>
</srcSchema>
My Java Script Code:
var myXML = <wechatAccounts xtkschema="bfwechat:wechatAccounts" accountId="123456" _key="@accountId" />
xtk.session.Write(myXML)