jQuery UI Widgets › Forums › TreeGrid › display xml structure in treegrid
Tagged: tree grid, xml structure
This topic contains 2 replies, has 2 voices, and was last updated by Shindou 8 years, 8 months ago.
-
Author
-
Hello,
I’m searching a way to display xml structure in treegrid,
What I get the original XML data:
<ctp-msg-tpl> <item code="msg" count="1..1"> <item code="msgCode" count="1..1"> </item> <item code="direction" count="1..1"> </item> <item code="body" count="1..1"> <item code="acctNo" count="1..1"> </item> </item> </item> <item code="msg" count="1..1"/> </ctp-msg-tpl>What I want to show is like a xml editor(user can add/delete/upadte xml elements and attributes):
code count
msg 1..1
>>msgCode 1..1
>>direction 1..1
>>body 1..1
>>>>acctNo 1..1
msg 1..1I don’t konw how to define the hierarchy,is there a way to achieve it?
Thanks in advance!
We have such example: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtreegrid/javascript-tree-grid-binding-to-nested-xml.htm?light
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks for yout answer,but the example is not what I want.
For example,I received the following XML data:
<item code="msg"> <item code="msgCode"> <item code="encode"></item> </item> </item>Element:<item code=”msg”> is parent of element:<item code=”msgCode”>
And element:<item code=”msgCode”> is parent of element:<item code=”encode”>I want to show this 3-deep-level relation(msg->msgCode->encode),
because the parent-child relation is obvious(by start tag and end tag),
so I think it’s not necessary to provide a hierarchy like:{ root: 'Employees', record: 'Employee' }or
{ keyDataField: { name: 'EmployeeID' }, parentDataField: { name: 'ReportsTo' } }But I still don’t know how to defines the root and record of each hiearchy level in jqxTreeGrid.
Sorry for my poor English,I find a little similar question at this forum,
hope it’s useful to make my question clear:
http://www.jqwidgets.com/community/topic/my-first-treegrid-3-level-deep-xml/Thanks again!
-
AuthorPosts
You must be logged in to reply to this topic.