troubleshooting Question

create text file from xml file - full xslt needed please

Avatar of Neil Thompson
Neil ThompsonFlag for United Kingdom of Great Britain and Northern Ireland asked on
Web Languages and StandardsXML
4 Comments1 Solution1210 ViewsLast Modified:
https://www.experts-exchange.com
 
Hi
 
I have the following XML file that I need to extract the data out of into text format (a line for each entire )for each <ReturnedDebitItem> node, can someone help with the XSLT please?
 
I'm ok with the very basics and currently use the following batch file and xalan.jar, xercesImpl.jar and xmlParserAPIs.jar called with the following batch file:
 

convert.bat
-----------
 
echo off
 
if not exist .\build-listed-buildings.bat goto ERROR
set CP=.\xalan.jar;.\xmlParserAPIs.jar;.\xercesImpl.jar
echo on
 
java -cp %CP% org.apache.xalan.xslt.Process -IN .\sd_arudd_270707.xml -XSL .\sd_arudd.xsl -OUT .\result.txt
 
echo off
goto END
 
:ERROR
echo This 'bat' file can only run from the root of the folder -- please 'cdir' to this folder then try again
goto END
 
:END
pause
echo on
 
 
 
--------------------------------------
 
<?xml version="1.0" encoding="UTF-8"?>
<BACSDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="newbacs-advices.xsd">
  <Data>
    <ARUDD>
      <Header reportType="abc123" adviceNumber="123" currentProcessingDate="2007-07-27"></Header>
      <AddresseeInformation name="test"></AddresseeInformation>
      <ServiceLicenseInformation userName="test" userNumber="123"></ServiceLicenseInformation>
      <Advice>
        <OriginatingAccountRecords>
          <OriginatingAccountRecord>
            <OriginatingAccount name="ABC HHGGDD P" number="22334455" sortCode="00-00-00" type="0" bankName="My Bank" branchName="High ROAD"></OriginatingAccount>
            <ReturnedDebitItem ref="PAR123            " transCode="66" returnCode="333" returnDescription="asdsad" originalProcessingDate="2007-07-25" valueOf="25.00" currency="GBP"><PayerAccount number="12345678" ref="P00531            " name="asdfg &amp; dsfsdf" sortCode="01-01-01" bankName="My Bank 1" branchName="HIGH STREET"></PayerAccount></ReturnedDebitItem>
            <ReturnedDebitItem ref="PAR123            " transCode="77" returnCode="444" returnDescription="asdasd" originalProcessingDate="2007-07-25" valueOf="75.00" currency="GBP"><PayerAccount number="87654321" ref="P00674            " name="zxccxz &amp; dsfsdf" sortCode="02-02-02" bankName="My Bank 2" branchName="LOW STREET"></PayerAccount></ReturnedDebitItem>
            <Totals numberOf="2" valueOf="100..00" currency="GBP"></Totals>
          </OriginatingAccountRecord>
        </OriginatingAccountRecords>
      </Advice>
    </ARUDD>
  </Data>
  <SignatureMethod></SignatureMethod>
  <Signature></Signature>
</BACSDocument>
 
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros