Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 325719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:14:34+00:00 2026-05-12T09:14:34+00:00

I am having a xml file as: <Order> <EP> <Name>Generation Date</Name> <Value>2009-08-04+05:30</Value> </EP> <EP>

  • 0

I am having a xml file as:

<Order>
  <EP>
  <Name>Generation Date</Name>
  <Value>2009-08-04+05:30</Value>
  </EP>
  <EP>
  <Name>NoOfRecords</Name>
  <Value>100</Value>
  </EP>
 <OrderLineItems>
   <OrderLineItem OrderDateTime="2007-01-01T17:09:04.593+05:30>
   <Customer>
      <FullName>Mrs S </FulName>
   <Address>
     <AddressLine1>ABC</AddressLine1>
     <AddressLine2>XYZ</AddressLine2>
   </Address>
   </Customer>
   <EP>
      <Name>DealerAccount</Name>
      <Value>00000000000</Value>
   </EP>
 </OrderLineItem>
 </OrderLineItems>
</Order>

Where the OrderLineItem tag is repeating. Now I want to convert this xml to a text file using xslt. The format of flat file is fixed and it’s as follows:

00000000000010107     Mrs S       ABC  XYZ 
00000000000150709     Mr x        PQR  TWR

where the first column contains the Dealeraccount and orderDate(time removed) second field is name and third and fourth field are addressline 1 and addressline2 respectively.
Please note that the formatting of text file is must and I am also having the length of each field such as length of name is varchar2(50) and so on.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:14:34+00:00Added an answer on May 12, 2026 at 9:14 am

    Well finally i got it..here is the solution

    <xsl:template name="ColumnSeparator">
            <xsl:param name="count" select="1"/>
            <xsl:param name="separator" select="' '"/>
            <xsl:if test="$count > 0">
                <xsl:value-of select="$separator"/>
                <xsl:call-template name="ColumnSeparator">
                    <xsl:with-param name="count" select="$count - 1"/>
                </xsl:call-template>
            </xsl:if>
        </xsl:template>
    

    And then simply call this template using:

    <xsl:call-template name="ColumnSeparator">
                    <xsl:with-param name="count" select="50-string-length(Customer/FullName)"/>
                </xsl:call-template>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i am having the xml file as: <order><Extension Properties><Date>2009-08-04T17:09:04.593+05:30</Date></Extension Properties></Order> and i want
I'm having trouble trying to update my xml file with a new value. I
I'm having trouble editing an XML file. I'm currently trying to use Nokogiri ,
I'm having a problem writing Norwegian characters into an XML file using C#. I
I'm having trouble understanding why I would use a context.xml file to declare a
I'm using DOM to parse an xml file. And I am having trouble catching
I'm having trouble dealing with some XML file (which is at the end of
I am having a problem while parsing XML file,i used newsRSS parser as a
I'm having a hard time getting XML values from an XML file using XPath.
I am having xml with following structure <ruleDefinition appId=3 customerId = acf> <node alias=element1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.