asha80 has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Converting xml file into fixed length file

Replies are listed 'Best First'.
Re: Converting xml file into fixed length file
by Corion (Patriarch) on Jun 10, 2009 at 08:03 UTC

    This is not a program writing site. Please post the relevant parts of the code you have already written, and an exact description of where you encounter problems. You will likely want to read XML::Twig and sprintf or pack.

Re: Converting xml file into fixed length file
by dHarry (Abbot) on Jun 10, 2009 at 09:46 UTC

    xml file into fixed length file

    What do you mean by that? Can you post an example, relevant snippet of XML and desired output format?

    In general when you want to transform an XML document into something/anything, the XML-ish way of doing that is with XSLT. Look for example at XML::XSLT or XML::LibXSLT.

    Hint: take a look at the XSLT functions: substring(string,start,len), string-length(string)...

Re: Converting xml file into fixed length file
by Jenda (Abbot) on Jun 10, 2009 at 15:01 UTC

    Until you show us you tried we can at most recommend some modules. XML::Rules should be able to help you even with huge XML files.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.