Filemaker import xml

Hi,

Please find the below XML's.
I want to import them to the database, can you please advice on how to create the XSL for importing the below data.

<?xml version="1.0" encoding="UTF-8"?><cXML payloadID="891277.15.65165.1197320514" timestamp="Mon, 20 Dec 10 15:01:54 -0600" lang="en-US">
<Header><From><Credential domain="NetworkID"><Identity>Dealer Name</Identity></Credential></From>
<To><Credential domain="NetworkID"><Identity>AcuSport</Identity></Credential></To>
<Sender><Credential domain="NetworkID"><Identity>Dealer Name</Identity><SharedSecret>xxxxx</SharedSecret>
</Credential><UserAgent>Dealer Name</UserAgent></Sender></Header>
<Request deploymentMode="test"><OrderRequest>
<OrderRequestHeader dealerid="99999999" referenceNumber="88888888" orderID="12345-A45" orderDate="2008-01-07" type="new" orderType="regular">
<ShipTo><Address addressID="987654">
<Name lang="en">John Doe</Name><PostalAddress name="default">
<DeliverTo>John Doe</DeliverTo><Street>999 Anywhere</Street>
<City>Bluffton</City><State>OH</State><PostalCode>45817</PostalCode>
<Country isoCountryCode="US">United States</Country></PostalAddress></Address></ShipTo>
<ShipVia carrier="FedEx"><ServiceCode>XFDP</ServiceCode></ShipVia>
<BillTo><Address><Name lang="en">Dealer Name</Name><PostalAddress name="default">
<Street>Dealer Address</Street><City>Dealer City</City><State>XX</State><PostalCode>Dealer Zip</PostalCode>
<Country isoCountryCode="US">United States</Country></PostalAddress></Address></BillTo>
<Comments lang="en-US"/></OrderRequestHeader>
<ItemOut quantity="1" lineNumber="1"><ItemID><SupplierPartID>1036</SupplierPartID></ItemID>
<ItemDetail><UnitPrice><Money currency="USD">15.96</Money></UnitPrice></ItemDetail></ItemOut>
<ItemOut quantity="1" lineNumber="2"><ItemID><SupplierPartID>SELECT</SupplierPartID></ItemID>
<ItemDetail><UnitPrice><Money currency="USD">68.76</Money></UnitPrice></ItemDetail></ItemOut>
<ItemOut quantity="1" lineNumber="3"><ItemID><SupplierPartID>2277</SupplierPartID></ItemID>
<ItemDetail><UnitPrice><Money currency="USD">103.96</Money></UnitPrice></ItemDetail></ItemOut>
<ItemOut quantity="1" lineNumber="4"><ItemID><SupplierPartID>19000</SupplierPartID></ItemID>
<ItemDetail><UnitPrice><Money currency="USD">299.992</Money></UnitPrice></ItemDetail></ItemOut>
<ItemOut quantity="1" lineNumber="5"><ItemID><SupplierPartID>9991</SupplierPartID></ItemID>
<ItemDetail><UnitPrice><Money currency="USD">119.16</Money></UnitPrice></ItemDetail></ItemOut>
<ItemOut quantity="1" lineNumber="6"><ItemID><SupplierPartID>6727</SupplierPartID></ItemID>
<ItemDetail><UnitPrice><Money currency="USD">1084.80</Money></UnitPrice></ItemDetail></ItemOut>
<ItemOut quantity="1" lineNumber="7"><ItemID><SupplierPartID>410201</SupplierPartID></ItemID>
<ItemDetail><UnitPrice><Money currency="USD">499.592</Money></UnitPrice></ItemDetail></ItemOut>
</OrderRequest></Request></cXML>

Open in new window


<?xml version="1.0" encoding="UTF-8"?><cXML lang="" payloadID="93827.157.569513.1239731401             " timestamp="">
<Header>
<From><Credential domain=""><Identity>AcuSport</Identity></Credential></From>
<To><Credential domain=""><Identity>Dealer Name</Identity></Credential></To>
<Sender><Credential domain=""><Identity/><SharedSecret></SharedSecret></Credential><UserAgent/></Sender>
</Header>
<Request deploymentMode="test">
<ShipNoticeRequest>
<ShipNoticeHeader shipmentID="8183853-0" noticeDate="2010-07-20T10-05-671" shipmentDate="20100720" deliveryDate=""/>
<ShipControl><CarrierIdentifier domain="SCAC">FDXH</CarrierIdentifier>
<CarrierIdentifier domain="companyName">Federal Express</CarrierIdentifier>
<ShipmentIdentifier>503874171903348         </ShipmentIdentifier>
<ShipmentIdentifier>503874171903354         </ShipmentIdentifier>
</ShipControl>
<ItemOut requestedDeliveryDate="" quantity="3" lineNumber="1"><ItemID><SupplierPartID>17-5010        </SupplierPartID></ItemID>
<ItemDetail><UnitPrice><Money currency="">42.4100</Money></UnitPrice></ItemDetail>
<Comments lang="">                                                            </Comments>
</ItemOut>
<ItemOut requestedDeliveryDate="" quantity="10" lineNumber="2"><ItemID><SupplierPartID>A-179       </SupplierPartID></ItemID>
<ItemDetail><UnitPrice><Money currency="">2.1000</Money></UnitPrice></ItemDetail>
<Comments lang="">                                                            </Comments>
</ItemOut>
<ShipNoticePortion><OrderReference referenceNumber="569513              " orderID="93827          ">
<DocumentReference payloadID="93827.157.569513.1239731401             "/></OrderReference>
</ShipNoticePortion>
</ShipNoticeRequest>
</Request>
</cXML>

Open in new window

LVL 5
magentoAsked:
Who is Participating?
 
Will LovingPresidentCommented:
0
 
Peter HarrisFileMaker Developer at CognitiveCommented:
An alternative to using XSL:

The free Base Elements plugin is at: http://www.goya.com.au/blog/free-baseelements-plugin-featured-filemaker-solutions).

It provides an XPath function.
XPath provides a powerful way of referencing elements of the XML data. It lets you 'traverse' the XML data.
Eg. return the 52nd Item UnitPrice from the data.
Some details about XPath here: http://www.w3schools.com/xpath/xpath_syntax.asp 

The plugin function documented here: https://github.com/nickorr/BaseElements-Plugin/wiki/Functions#BE_XPath

I have used this before with a looping script to process large XML files into separate database records. Example portion of a filemaker script is in the image.

Anyway, this is another option that may give you flexibility with XML processing.
Edit-Script--Clients-NightlyDataRun---Bi
0
 
magentoAuthor Commented:
Sorry for the delayed response , i will revert quickly.

Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.