0
나는 XML과 함께 작업하고 있습니다. 난 결과가 추가 문자가 포함 된 변환 적용하고 난 후변형은 여분의 데이터를 반환합니다
내 XML<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl"
href="file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/Test/XsltModelo.xslt"?>
<nyfile>
<HourNow>20140820230732</HourNow>
<Customer>
<ReportType>102,0x00000066</ReportType>
<BusinessDate>20140820</BusinessDate>
<Mix>
<ProductName>noname</ProductName>
<FamilyGroup>6</FamilyGroup>
</Mix>
</Customer>
</nyfile>
입니다
하고 그것에게 XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"
exclude-result-prefixes="xs fn">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<Items>
<xsl:apply-templates/>
</Items>
</xsl:template>
<xsl:template match="Mix">
<item>
<BusinessDate><xsl:value-of select="../BusinessDate" /></BusinessDate>
<ProductName><xsl:value-of select="ProductName" /></ProductName>
</item>
</xsl:template>
</xsl:stylesheet>
변환을 적용 이유를 잘 모릅니다 때 문제는
XML 결과에 여분의 문자가 포함되어 있습니다.20x0000006620140820, 누군가가 빛을 보여줄 수 있습니까?
<?xml version="1.0" encoding="UTF-8"?>
<Items>2,0x0000006620140820
<item>
<BusinessDate>20140820</BusinessDate>
<ProductName>noname</ProductName>
</item>
덕분에 많이. 그러나 하나의 문제가 존재합니다 고객이 변수가 존재할 수 있습니다 Customer, Customer1, customer2, customer3. 선택에서 어떻게 "nyfile/Customer */Mix"를 설정할 수 있습니까? –