Jump to content
Server Maintenance This Week. ×

Need help In using Xslt in Eliminating Duplicates in Xml import


tapfumat

This topic is 4019 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I am exporting child  records together with their parents to an Xml file from filemaker whilst i am sitting on the child records.MY problem now is when i want to import them into another database i want to import the parents separately and the children separately the parents are now coming in duplicates.So i need help in elimanating the duplicate parent records when importing into the secondary database.

 

Any help would be appreciated please

Link to comment
Share on other sites

Need two imports, with a XSLT for each of them. One would loop the parent nodes, and the second would then loop the child nodes beneath them.

 

Also make sure the XML includes an ID that links them together.

Link to comment
Share on other sites

  • Newbies

The xml file is too long so i had to cut it...The fields i want to re import into filemaker are the first two .I am looking for stylesheets to now delete the duplicates.

 

 

<?xml version="1.0" encoding="UTF-8" ?>
- <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
  <ERRORCODE>0</ERRORCODE>
  <PRODUCT BUILD="06-11-2010" NAME="FileMaker" VERSION="ProAdvanced 11.0v2" />
  <DATABASE DATEFORMAT="D/m/yyyy" LAYOUT="SYSTEM Transaction Items" NAME="Tribac v1_0.fp7" RECORDS="471" TIMEFORMAT="k:mm:ss" />
- <METADATA>
  <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Account Master::Account ID" TYPE="TEXT" />
  <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Account Master::Account Name" TYPE="TEXT" />
  <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Transaction Master::Date" TYPE="DATE" />
  <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Transaction Master::Human Reference Number" TYPE="TEXT" />
  <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Transaction Master::Description" TYPE="TEXT" />
  <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Transaction Master::System Transaction Type" TYPE="TEXT" />
  <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Season Schemes for TI::Season Scheme Name" TYPE="TEXT" />
  <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Quantity Reference" TYPE="NUMBER" />
  <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Units Calc" TYPE="TEXT" />
  </METADATA>
- <RESULTSET FOUND="471">
- <ROW MODID="180" RECORDID="1233">
- <COL>
  <DATA>MUS001</DATA>
  </COL>
- <COL>
  <DATA>Musunje, Albert</DATA>
  </COL>
- <COL>
  <DATA>25/1/2011</DATA>
  </COL>
- <COL>
  <DATA>CD000001</DATA>
  </COL>
- <COL>
  <DATA>Test Drawdown 1</DATA>
  </COL>
- <COL>
  <DATA>CASH DRAWDOWN</DATA>
  </COL>
- <COL>
  <DATA>TOBACCO INPUTS, 2011-12</DATA>
  </COL>
- <COL>
  <DATA>41600</DATA>
  </COL>
- <COL>
  <DATA>USD</DATA>
  </COL>
  </ROW>
- <ROW MODID="174" RECORDID="1234">
- <COL>
  <DATA>MUS001</DATA>
  </COL>
- <COL>
  <DATA>Musunje, Albert</DATA>
  </COL>
- <COL>
  <DATA>25/2/2011</DATA>
  </COL>
- <COL>
  <DATA>CD000002</DATA>
  </COL>
- <COL>
  <DATA>Test Drawdown 2</DATA>
  </COL>
- <COL>
  <DATA>CASH DRAWDOWN</DATA>
  </COL>
- <COL>
  <DATA>TOBACCO INPUTS, 2011-12</DATA>
  </COL>
- <COL>
  <DATA>40000</DATA>
  </COL>
- <COL>
  <DATA>USD</DATA>
  </COL>
  </ROW>
- <ROW MODID="174" RECORDID="1235">
- <COL>
  <DATA>MUS001</DATA>
  </COL>
- <COL>
  <DATA>Musunje, Albert</DATA>
  </COL>
- <COL>
  <DATA>25/03/2011</DATA>
  </COL>
- <COL>
  <DATA>CD000003</DATA>
  </COL>
- <COL>
  <DATA>Test Drawdown 3</DATA>
  </COL>
- <COL>
  <DATA>CASH DRAWDOWN</DATA>
  </COL>
- <COL>
  <DATA>TOBACCO INPUTS, 2011-12</DATA>
  </COL>
- <COL>
  <DATA>40000</DATA>
  </COL>
- <COL>
  <DATA>USD</DATA>
  </COL>
  </ROW>
- <ROW MODID="174" RECORDID="1236">
- <COL>
  <DATA>MUS001</DATA>
  </COL>
- <COL>
  <DATA>Musunje, Albert</DATA>
  </COL>
- <COL>
  <DATA>25/4/2011</DATA>
  </COL>
- <COL>
  <DATA>CD000004</DATA>
  </COL>
- <COL>
  <DATA>Test Drawdown 4</DATA>
  </COL>
- <COL>
  <DATA>CASH DRAWDOWN</DATA>
  </COL>
- <COL>
  <DATA>TOBACCO INPUTS, 2011-12</DATA>
  </COL>
- <COL>
  <DATA>40000</DATA>
  </COL>
- <COL>
  <DATA>USD</DATA>
  </COL>
  </ROW>
- <ROW MODID="174" RECORDID="1237">
- <COL>
  <DATA>MUS001</DATA>
  </COL>
- <COL>
  <DATA>Musunje, Albert</DATA>
  </COL>
- <COL>
  <DATA>25/5/2011</DATA>
  </COL>
- <COL>
  <DATA>CD000005</DATA>
  </COL>
- <COL>
  <DATA>Test Drawdown 5</DATA>
  </COL>
- <COL>
  <DATA>CASH DRAWDOWN</DATA>
  </COL>
- <COL>
  <DATA>TOBACCO INPUTS, 2011-12</DATA>
  </COL>
- <COL>
  <DATA>40000</DATA>
  </COL>
- <COL>
  <DATA>USD</DATA>
  </COL>
  </ROW>
- <ROW MODID="175" RECORDID="1238">
- <COL>
  <DATA>MUS001</DATA>
  </COL>
- <COL>
  <DATA>Musunje, Albert</DATA>
  </COL>
- <COL>
  <DATA>25/6/2011</DATA>
  </COL>
- <COL>
  <DATA>RP00000002</DATA>
  </COL>
- <COL>
  <DATA>Test Repayment 1</DATA>
  </COL>
- <COL>
  <DATA>STOP ORDER</DATA>
  </COL>
- <COL>
  <DATA>TOBACCO INPUTS, 2011-12</DATA>
  </COL>
- <COL>
  <DATA>30000</DATA>
  </COL>
- <COL>
  <DATA>USD</DATA>
  </COL>
  </ROW>
Link to comment
Share on other sites

That *is* a FileMaker XML file - it should just be able to import it, and match field names appropriately.

 

You can then deal with duplicates in FileMaker

Link to comment
Share on other sites

This topic is 4019 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.