I'm running WebSpeed 10.1C on a Windows 2008 server.
I would like to use XML-READ to read an XML file and store it in a temp-table. I'm not sure how to define a static temp-table using the following XML:
I'm not sure how to define the <Category> data element in a temp-table definition.
Here's my temp-table definition with the READ-XML command:
I received a valid return code on the READ-XML but there is only a blank record in t-GetCategoryChildren.
If I remove <a:Category></a:Category> from the XML I'm able to store only the last record in t-GetCategoryChildren.
Any idea what's causing the problem?
Thanks for your help.
I would like to use XML-READ to read an XML file and store it in a temp-table. I'm not sure how to define a static temp-table using the following XML:
Code:
<GetCategoryChildrenResponse xmlns="http://tempuri.org/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<GetCategoryChildrenResult xmlns:a="http://schemas.datacontract.org/2004/07/Logicblock.Commerce.Domain" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Category>
<a:Description></a:Description>
<a:Id>cf7e755e-1934-42bb-beb8-def1d4d8d682</a:Id>
<a:Name>Cloth Duct Tapes</a:Name>
<a:ParentId>03bf3128-cb61-463f-85df-8e132e22d693</a:ParentId>
</a:Category>
<a:Category>
<a:Description></a:Description>
<a:Id>dd931778-d9fc-4bc0-ad52-d36aa5e8dc77</a:Id>
<a:Name>Doublecoated Tapes</a:Name>
<a:ParentId>03bf3128-cb61-463f-85df-8e132e22d693</a:ParentId>
</a:Category>
<a:Category>
<a:Description></a:Description>
<a:Id>184ddef3-26af-4c05-b333-0be640214f84</a:Id>
<a:Name>Electrical Tapes</a:Name>
<a:ParentId>03bf3128-cb61-463f-85df-8e132e22d693</a:ParentId>
</a:Category>
</GetCategoryChildrenResult>
</GetCategoryChildrenResponse>
I'm not sure how to define the <Category> data element in a temp-table definition.
Here's my temp-table definition with the READ-XML command:
Code:
def temp-table t-GetCategoryChildren undo
xml-node-name 'GetCategoryChildrenResult'
field Category as char /* not sure if correct */
field Description as char
field Id as char
field Name as char
field Parentid as char
index k-GetRootCategories is primary unique Id.
v-return-mode = TEMP-TABLE t-GetRootCategories:READ-XML("FILE", "data.xml", "EMPTY", ?,?,?,?).
I received a valid return code on the READ-XML but there is only a blank record in t-GetCategoryChildren.
If I remove <a:Category></a:Category> from the XML I'm able to store only the last record in t-GetCategoryChildren.
Any idea what's causing the problem?
Thanks for your help.