archerrsa-archer-grc

I am trying to import data into Archer from an XML file using File Transport data Feed. But no records are getting created


I am providing XML input as below:

<Records>
  <Record>
    <Field>SPH0</Field>
    <Field>Alberta</Field>
  </Record>
</Records>

XSLT input in navigation as:

<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/Records">
 <ArcherRecord>
                <Regulator>
                    <xsl:value-of select="Record/Field"/>
                </Regulator>                   
 </ArcherRecord>
    </xsl:template>
</xsl:stylesheet>

DataFeed gets successfully completed but no records are created. I am not able to understand which part I am giving wrong. Like is it XML or XSLT or DataFeed configuration?


Solution

  • Shivani, try the following xslt

    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns="http://www.archer-tech.com/">
      <xsl:output method="xml" indent="yes"/>
    
      <xsl:template match="Records">
        <ArcherRecords>
          <xsl:apply-templates select="Record" />
        </ArcherRecords>
      </xsl:template>
    
      <xsl:template match="Record" >
        <ArcherRecord>
            <Regulator>
                <xsl:value-of select="Field"/>
            </Regulator> 
        </ArcherRecord>
       </xsl:template>
    </xsl:stylesheet>