开发者

How to display an XML file in an Ext GWT / GXT TreeGrid with generic columns?

I'm using Ext GWT 2.2.3 and I am trying to read a XML as a string and display it as a TreeGrid.

The XML is in a form like:

<a>
   <b>
       <ba>Hello</ba>
   </b>
   <c>
     <ca>64</d>
     <cb>Some name</cb>
     <cc>Product</cc>
   </c>
   <d>
      <da>Status</da
      <db>Information</db>
   </d>
</a>

And I want my TreeGrid to look like

Tag       |   Value

- a
  - b
     ba        Hello
  - c
     ca        64
     cb        Some name
     cc        Product
  - d
     da        Status
     db        Information

(With a,b,c and d being expandable items, the rest not)

That is just a friction, the complete XML will have around 50-70 different tags.

Is this even p开发者_如何转开发ossible? I only see TreeGrids having predefined ColumnConfigs, but I really want to avoid writing up to 70 ColumnConfigs by hand... there has to be a generic solution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜