Я знаю, что сообщение об ошибке в заголовке указывает, что приложение, в котором я запускаю код XML, похоже, не распознает его как XML. Я сравнил его с другим кодом, который использовал недавно, и не могу найти проблему. Однако есть одно большое отличие в том, что я использую вместе с ним XSLT, что может быть причиной. Я включил фрагмент кода XML и XSLT для справки.
<?xml version="1.0" encoding="UTF-8"?>
<GLPayrollExportConfiguration>
<definitions>
<FileType Value="CSV"/>
<FileName>
<Value Value="GL_Summary_"/>
<Value Value="paygroup_xref"/>
<Value Value="_"/>
<Value Value="payrun_payperiod_and_suffix"/>
<Value Value="_"/>
<Value Value="transaction_timestamp"/>
<Value Value=".csv"/>
</FileName>
<Settings>
<SplitMode Value="HOME_LOCATION_SPLIT"/>
<ChartOfAccountXRefCode Value="GL"/>
<RunOnPayRunCommit Value="True"/>
</Settings>
<Header>
<Text Value="Posting Date,"/>
<Text Value="Document Type,"/>
<Text Value="Account Type,"/>
<Text Value="Account No,"/>
<Text Value="Fund No,"/>
<Text Value="Dimension Speedkey Code,"/>
<Text Value="Dimension 1,"/>
<Text Value="Dimension 2,"/>
<Text Value="Dimension 3,"/>
<Text Value="Dimension 4,"/>
<Text Value="Dimension 5,"/>
<Text Value="Dimension 6,"/>
<Text Value="Dimension 7,"/>
<Text Value="Dimension 8,"/>
<Text Value="External Document No,"/>
<Text Value="Description,"/>
<Text Value="Amount,"/>
</Header>
<Columns>
<Column Name="PostingDate" DataType="datetime" Source="data" Value="payrun_pay_date" Sort="true"/>
<Column Name="ColumnC" DataType="string" Source="mapping"/>
<Column Name="AccountNo" DataType="string" Source="data" Value="payrun_category_override_journal_number"/>
<Column Name="FundNo" DataType="string" Value="UNREST"/>
<Column Name="DimensionSpeedkeyCode" DataType="string" Source="mapping"/>
<Column Name="Description" DataType="string" Source="mapping"/>
<Column Name="Amount" DataType="number" Source="data" Value="payrun_amount" Function="sum" />
</Columns>
</definitions>
<MappingDefinitions>
<definition>
<criteriaset>
<!-- EXCLUDE MEMO DEDUCTIONS AND TAXABLE BENEFITS / JOURNAL NUMBER CODED AS exclude, Exclude, or EXCLUDE -->
<criteria item="payrun_category_override_journal_number" op="ne">EXCLUDE</criteria>
<criteria item="payrun_category_override_journal_number" op="ne">Exclude</criteria>
<criteria item="payrun_category_override_journal_number" op="ne">exclude</criteria>
<!-- EXCLUDE RECORDS WITH with 0 VALUE -->
<criteria item="payrun_amount" op="ne" opDataType="number">0</criteria>
</criteriaset>
<mapping>
<mapto columnname="Col C">
<Value Value="	"/><Value Value="PAYROLL"/>
<Value Value="payrun_pay_date"/>
</mapto>
<mapto columnname="Dimension Speedkey Code">
<Value Value="	"/><Value Value="override_segment_charged_dynamic_org_level_onsitedepartment"/>
<Value Value="override_segment_dynamic_labor_metric_code_CostNumber"/>
</mapto>
<mapto columnname="Description">
<Value Value="	"/><Value Value="payrun_pay_date"/>
<Value Value=" "/><Value Value="payrun_category_name"/>
</mapto>
</mapping>
</definition>
</MappingDefinitions>
<ColumnFormats>
<ColumnFormat Name="PostingDate" Format="MM.dd.yy"/>
<ColumnFormat Name="ColC" Format="YYYYMMDD"/>
<ColumnFormat Name="AccountNo" WrapChar="""/>
<ColumnFormat Name="DimensionSpeedkeyCode" WrapChar="""/>
<ColumnFormat Name="Description" Format="mm.dd.yy" WrapChar="""/>
<ColumnFormat Name="Amount" Format="{0:##.00}"/>
</ColumnFormats>
</GLPayrollExportConfiguration>
XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:choose>
<xsl:when test="override_segment_dynamic_labor_metric_code_CostNumber=' '">
<xsl:value-of select="override_segment_charged_dynamic_org_level_onsitedepartment"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="override_segment_dynamic_labor_metric_code_CostNumber"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Мысли?