Jump to content
Sign in to follow this  
ggt667

FMPXMLRESULT to psql COPY

Recommended Posts

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
Sign in to follow this  

  • Similar Content

    • By ggt667
      This is an XSLT stylesheet to convert from FileMaker's fmpxmlresult to sitemap and vice-versa.
      https://github.com/TyrfingMjolnir/fmpxmlresult2sitemap
    • By ggt667
      https://github.com/TyrfingMjolnir/fmpxmlresult2SwiftyJSONModel
    • By ggt667
      How can I get ESS access to PostgreSQL from FM11SA?
    • By Gurratheboy
      Hi!
      I have this persistant problem when I try to import my XLM data into filemaker.
      I use various XML inportations in my filemaker database and they all import perfect with the msdso_elem.xslt file, but not this xml type!
      I don't know what I'm doing wrong... I made this XSLT document,  but when I try to import it, the actual record fields are empty!!!
       
      This is the XML document I would like to import:
      <Order url="https://api.fortnox.se/3/orders/3" urlTaxReductionList="https://api.fortnox.se/3/taxreductions?filter=orders&referencenumber=3"> <AdministrationFee>0</AdministrationFee> <AdministrationFeeVAT>0</AdministrationFeeVAT> <Address1>gurratheboy</Address1> <Address2>gurratheboy</Address2> <BasisTaxReduction>0</BasisTaxReduction> <Cancelled>false</Cancelled> <City>gurratheboy</City> <Comments/> <ContributionPercent>0</ContributionPercent> <ContributionValue>0</ContributionValue> <CopyRemarks>false</CopyRemarks> <Country>France</Country> <CostCenter/> <Currency>SEK</Currency> <CurrencyRate>1</CurrencyRate> <CurrencyUnit>1</CurrencyUnit> <CustomerName>gurratheboy</CustomerName> <CustomerNumber>2</CustomerNumber> <DeliveryAddress1/> <DeliveryAddress2/> <DeliveryCity/> <DeliveryCountry/> <DeliveryDate>2015-01-17</DeliveryDate> <DeliveryName/> <DeliveryZipCode/> <DocumentNumber>3</DocumentNumber> <EmailInformation>...</EmailInformation> <ExternalInvoiceReference1/> <ExternalInvoiceReference2/> <Freight>0</Freight> <FreightVAT>0</FreightVAT> <Gross>200</Gross> <HouseWork>false</HouseWork> <InvoiceReference>3</InvoiceReference> <Language>SV</Language> <Net>200</Net> <NotCompleted>false</NotCompleted> <OfferReference>0</OfferReference> <OrderDate>2015-01-17</OrderDate> <OrderRows> <OrderRow> <AccountNumber>3016</AccountNumber> <ArticleNumber>1</ArticleNumber> <ContributionPercent>0</ContributionPercent> <ContributionValue>0</ContributionValue> <CostCenter/> <DeliveredQuantity>1.00</DeliveredQuantity> <Description>Fortnox Bokföring</Description> <Discount>0</Discount> <DiscountType>PERCENT</DiscountType> <HouseWork>false</HouseWork> <OrderedQuantity>1.00</OrderedQuantity> <Price>100</Price> <Project/> <Total>100</Total> <Unit/> <VAT>25</VAT> </OrderRow> <OrderRow> <AccountNumber>3016</AccountNumber> <ArticleNumber>1</ArticleNumber> <ContributionPercent>0</ContributionPercent> <ContributionValue>0</ContributionValue> <CostCenter/> <DeliveredQuantity>1.00</DeliveredQuantity> <Description>Fortnox Bokföring</Description> <Discount>0</Discount> <DiscountType>PERCENT</DiscountType> <HouseWork>false</HouseWork> <OrderedQuantity>1.00</OrderedQuantity> <Price>100</Price> <Project/> <Total>100</Total> <Unit/> <VAT>25</VAT> </OrderRow> </OrderRows> <OrganisationNumber>gurratheboy</OrganisationNumber> <OurReference>API User</OurReference> <Phone1>gurratheboy</Phone1> <Phone2>gurratheboy</Phone2> <PriceList>A</PriceList> <PrintTemplate>oc</PrintTemplate> <Project>0</Project> <Remarks/> <RoundOff>0</RoundOff> <Sent>false</Sent> <TaxReduction/> <TermsOfDelivery/> <TermsOfPayment/> <Total>250</Total> <TotalToPay>250</TotalToPay> <TotalVAT>50</TotalVAT> <VATIncluded>false</VATIncluded> <WayOfDelivery/> <YourReference/> <YourOrderNumber/> <ZipCode>gurrathebo</ZipCode> </Order> This Is my XSLT document:
      <?xml version='1.0' encoding='UTF-8'?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult"> <METADATA> <FIELD NAME="AccountNumber" TYPE="NUMBER"/> <FIELD NAME="Address1" TYPE="TEXT"/> <FIELD NAME="Address2" TYPE="TEXT"/> <FIELD NAME="AdministrationFee" TYPE="NUMBER"/> <FIELD NAME="AdministrationFeeVAT" TYPE="NUMBER"/> <FIELD NAME="BasisTaxReduction" TYPE="NUMBER"/> <FIELD NAME="Cancelled" TYPE="TEXT"/> <FIELD NAME="City" TYPE="TEXT"/> <FIELD NAME="Comments" TYPE="TEXT"/> <FIELD NAME="ContributionPercent" TYPE="NUMBER"/> <FIELD NAME="ContributionPercent1" TYPE="NUMBER"/> <FIELD NAME="ContributionValue" TYPE="NUMBER"/> <FIELD NAME="ContributionValue1" TYPE="NUMBER"/> <FIELD NAME="CopyRemarks" TYPE="TEXT"/> <FIELD NAME="CostCenter" TYPE="TEXT"/> <FIELD NAME="CostCenter1" TYPE="NUMBER"/> <FIELD NAME="Country" TYPE="NUMBER"/> <FIELD NAME="Currency" TYPE="TEXT"/> <FIELD NAME="CurrencyRate" TYPE="NUMBER"/> <FIELD NAME="CurrencyUnit" TYPE="NUMBER"/> <FIELD NAME="CustomerName" TYPE="TEXT"/> <FIELD NAME="CustomerNumber" TYPE="NUMBER"/> <FIELD NAME="DeliveredQuantity" TYPE="NUMBER"/> <FIELD NAME="DeliveryAddress1" TYPE="TEXT"/> <FIELD NAME="DeliveryAddress2" TYPE="TEXT"/> <FIELD NAME="DeliveryCity" TYPE="TEXT"/> <FIELD NAME="DeliveryCountry" TYPE="TEXT"/> <FIELD NAME="DeliveryDate" TYPE="TIME"/> <FIELD NAME="DeliveryName" TYPE="TEXT"/> <FIELD NAME="Description" TYPE="TEXT"/> <FIELD NAME="DiscountType" TYPE="TEXT"/> <FIELD NAME="DocumentNumber" TYPE="NUMBER"/> <FIELD NAME="EmailAddressBCC" TYPE="TEXT"/> <FIELD NAME="EmailAddressCC" TYPE="TEXT"/> <FIELD NAME="EmailAddressFrom" TYPE="TEXT"/> <FIELD NAME="EmailAddressTo" TYPE="TEXT"/> <FIELD NAME="EmailSubject" TYPE="TEXT"/> <FIELD NAME="ExternalInvoiceReference1" TYPE="TEXT"/> <FIELD NAME="ExternalInvoiceReference2" TYPE="TEXT"/> <FIELD NAME="Freight" TYPE="NUMBER"/> <FIELD NAME="FreightVAT" TYPE="NUMBER"/> <FIELD NAME="Gross" TYPE="NUMBER"/> <FIELD NAME="HouseWork" TYPE="TEXT"/> <FIELD NAME="HouseWork1" TYPE="TEXT"/> <FIELD NAME="InvoiceReference" TYPE="NUMBER"/> <FIELD NAME="Language" TYPE="TEXT"/> <FIELD NAME="Net" TYPE="NUMBER"/> <FIELD NAME="NotCompleted" TYPE="TEXT"/> <FIELD NAME="OfferReference" TYPE="NUMBER"/> <FIELD NAME="OrderDate" TYPE="DATE"/> <FIELD NAME="OrderedQuantity" TYPE="NUMBER"/> <FIELD NAME="OrderRow" TYPE="TEXT"/> <FIELD NAME="OrderRows" TYPE="TEXT"/> <FIELD NAME="OrganisationNumber" TYPE="NUMBER"/> <FIELD NAME="OurReference" TYPE="NUMBER"/> <FIELD NAME="Phone1" TYPE="TEXT"/> <FIELD NAME="Phone2" TYPE="TEXT"/> <FIELD NAME="Price" TYPE="NUMBER"/> <FIELD NAME="PriceList" TYPE="TEXT"/> <FIELD NAME="PrintTemplate" TYPE="TEXT"/> <FIELD NAME="Project" TYPE="NUMBER"/> <FIELD NAME="Project1" TYPE="TEXT"/> <FIELD NAME="Remarks" TYPE="TEXT"/> <FIELD NAME="RoundOff" TYPE="NUMBER"/> <FIELD NAME="Sent" TYPE="TEXT"/> <FIELD NAME="TaxReduction" TYPE="TEXT"/> <FIELD NAME="TermsOfDelivery" TYPE="TEXT"/> <FIELD NAME="TermsOfPayment" TYPE="NUMBER"/> <FIELD NAME="Total" TYPE="NUMBER"/> <FIELD NAME="Total1" TYPE="NUMBER"/> <FIELD NAME="TotalToPay" TYPE="NUMBER"/> <FIELD NAME="TotalVAT" TYPE="NUMBER"/> <FIELD NAME="Unit" TYPE="TEXT"/> <FIELD NAME="VAT" TYPE="NUMBER"/> <FIELD NAME="VATIncluded" TYPE="TEXT"/> <FIELD NAME="WayOfDelivery" TYPE="TEXT"/> <FIELD NAME="YourOrderNumber" TYPE="TEXT"/> <FIELD NAME="YourReference" TYPE="TEXT"/> <FIELD NAME="ZipCode" TYPE="TEXT"/> </METADATA> <RESULTSET> <ROW> <COL> <DATA><xsl:value-of select="Order/AdministrationFee/@value"/></DATA> </COL> <COL> <DATA><xsl:value-of select="order/AdministrationFeeVAT/@value"/></DATA> </COL> <COL> <DATA><xsl:value-of select="order/Address1/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="order/Adress2/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="order/BasisTaxReduction/@value"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> <COL> <DATA><xsl:value-of select="current/clouds/@name"/></DATA> </COL> </ROW> </RESULTSET> </FMPXMLRESULT> </xsl:template> </xsl:stylesheet> This is only one record, and my XSLT won't work!
      Can someone please help me and point out what I'm doing wrong? 
      If you have a working XSLT document please share!!
       
      Thanks!
    • By El_Pablo
      Hi.

      I'm trying to export data from an existing system to another one. I read somewhere that the FMPDSORESULT is deprecated so I want to use FMPXMLRESULT.

      All fields in both system have different name. e.g. in the FM system the last name field is lastName and in the target system it is personLastName.

      Since FMPXMLRESULT separate the structure from the data, how can I get the FM field name position from the structure?



      ... <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="lastName" TYPE="TEXT"/> ... <COL><DATA>Smith</DATA></COL> ... I would like to convert to the following format <personLastName>Smith</personLastName>

      So like I wrote I would like to get the position of lastName to be able to retrieve the right data column.

      Thanks for any help
×

Important Information

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