Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: create an xml file from column file

by hdb (Prior)
on Jul 24, 2013 at 11:23 UTC ( #1046077=note: print w/ replies, xml ) Need Help??


in reply to Re^2: create an xml file from column file
in thread create an xml file from column file

Ah! Then this is how I would do it:

  1. Loop over the lines of your input.
  2. Extract all word characters from the beginning of the line for the text field.
  3. Extract all word characters at the end of the line for the type field.
  4. Independently build the initial <text>...</text> and the <annotation>...</annotation> parts by adding them to two strings.
  5. After the loop print the two strings into an xml file.




Comment on Re^3: create an xml file from column file
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046077]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2014-12-21 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls