Foxtable(狐表)用户栏目专家坐堂 → 这种不对称的要如何生成XML


  共有2822人关注过本帖树形打印复制链接

主题:这种不对称的要如何生成XML

帅哥哟,离线,有人找我吗?
keli0917
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:童狐 帖子:289 积分:2709 威望:0 精华:0 注册:2018/5/21 16:49:00
这种不对称的要如何生成XML  发帖心情 Post By:2021/4/19 13:36:00 [只看该作者]

<?xml version="1.0" encoding="GBK"?>
 <business comment="fa piao开具" id="FPKJ">
  <REQUEST_COMMON_FPKJ class="REQUEST_COMMON_FPKJ">
   <COMMON_FPKJ_FPT class="COMMON_FPKJ_FPT">
    <FPQQLSH>2104181724080000001</FPQQLSH>
    <KPLX>0</KPLX>
    <BMB_BBH>38.0</BMB_BBH>
    <XSF_NSRSBH></XSF_NSRSBH>
    <XSF_MC></XSF_MC>
    <XSF_DZDH></XSF_DZDH>
    <XSF_YHZH></XSF_YHZH>
    <GMF_NSRSBH></GMF_NSRSBH>
    <GMF_MC>1</GMF_MC>
    <GMF_DZDH></GMF_DZDH>
    <GMF_YHZH></GMF_YHZH>
    <KPR> </KPR>
    <SKR> </SKR>
    <FHR> </FHR>
    <YFP_DM></YFP_DM>
    <YFP_HM></YFP_HM>
    <JSHJ>385.01</JSHJ>
    <HJJE>373.79</HJJE>
    <HJSE>11.22</HJSE>
    <HSBZ>0</HSBZ>
    <BZ></BZ>
   </COMMON_FPKJ_FPT>
   <COMMON_FPKJ_XMXXS class="COMMON_FPKJ_XMXX" size="1">
    <COMMON_FPKJ_XMXX>
     <FPHXZ>0</FPHXZ>
     <SPBM>1090413010100000000</SPBM>
     <ZXBM></ZXBM>
     <YHZCBS></YHZCBS>
     <LSLBS></LSLBS>
     <ZZSTSGL></ZZSTSGL>
     <XMMC>5号电池</XMMC>
     <GGXH>非充电,碱性</GGXH>
     <DW>个</DW>
     <XMSL>1</XMSL>
     <XMDJ>0.970873786408</XMDJ>
     <XMJE>0.970873786408</XMJE>
     <SL>0.03</SL>
     <SE>0.03</SE>
     <KCE>0.0</KCE>
    </COMMON_FPKJ_XMXX>
    <COMMON_FPKJ_XMXX>
     <FPHXZ>0</FPHXZ>
     <SPBM>1090413050000000000</SPBM>
     <ZXBM></ZXBM>
     <YHZCBS></YHZCBS>
     <LSLBS></LSLBS>
     <ZZSTSGL></ZZSTSGL>
     <XMMC>电池</XMMC>
     <GGXH>2# 1.5v</GGXH>
     <DW>个</DW>
     <XMSL>2</XMSL>
     <XMDJ>1.941747572816</XMDJ>
     <XMJE>3.883495145631</XMJE>
     <SL>0.03</SL>
     <SE>0.12</SE>
     <KCE>0.0</KCE>
    </COMMON_FPKJ_XMXX>
    <COMMON_FPKJ_XMXX>
     <FPHXZ>0</FPHXZ>
     <SPBM>1080128030000000000</SPBM>
     <ZXBM></ZXBM>
     <YHZCBS></YHZCBS>
     <LSLBS></LSLBS>
     <ZZSTSGL></ZZSTSGL>
     <XMMC>砂纸</XMMC>
     <GGXH>600目</GGXH>
     <DW>张</DW>
     <XMSL>10</XMSL>
     <XMDJ>9.708737864078</XMDJ>
     <XMJE>97.087378640777</XMJE>
     <SL>0.03</SL>
     <SE>2.91</SE>
     <KCE>0.0</KCE>
    </COMMON_FPKJ_XMXX>
   </COMMON_FPKJ_XMXXS>
  </REQUEST_COMMON_FPKJ>

 </business>

 

 

上面标红色的,这种不对称的如何用

XObject生成XML



 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110592 积分:562856 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/4/19 14:12:00 [只看该作者]

Dim jo As New Foxtable.XObject
jo("@id") = "FPKJ"
jo("REQUEST_COMMON_FPKJ") = new  JObject
jo("REQUEST_COMMON_FPKJ")("@class") = "REQUEST_COMMON_FPKJ"
jo("REQUEST_COMMON_FPKJ")("COMMON_FPKJ_FPT") = new  JObject
jo("REQUEST_COMMON_FPKJ")("COMMON_FPKJ_FPT")("@class") = "COMMON_FPKJ_FPT"
jo("REQUEST_COMMON_FPKJ")("COMMON_FPKJ_FPT")("FPQQLSH") = "2104181724080000001"
'其它属性
jo("REQUEST_COMMON_FPKJ")("COMMON_FPKJ_XMXXS") = new  JObject
jo("REQUEST_COMMON_FPKJ")("COMMON_FPKJ_XMXXS")("@class") = "COMMON_FPKJ_XMXX"
'其它属性
Dim ja As New JArray
Dim so As new JObject
so("FPHXZ") = 0
so("FPHXZ") = "1090413010100000000"
'其它属性
ja.Add(so)

so = new JObject
so("FPHXZ") = 0
so("FPHXZ") = "1090413050000000000"
'其它属性
ja.Add(so)
jo("REQUEST_COMMON_FPKJ")("COMMON_FPKJ_XMXXS")("COMMON_FPKJ_XMXX") = ja

Dim jo2 As New Foxtable.XObject
jo2("business") = jo
Output.Show(jo2.ToXML)

 回到顶部