Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: csv to xml

by Not_a_Number (Prior)
on Aug 06, 2016 at 13:46 UTC ( [id://1169255]=note: print w/replies, xml ) Need Help??


in reply to Re^3: csv to xml
in thread csv to xml

Yes.

If the CSV is well-formed, internal commas will be escaped in some way, eg:

Ed Smith, "Smith, Brown & Jones", sbj@example.com, "999,999,999"

Of course, if it isn't well-formed, I agree that Text::CSV will not help any more than a hand-rolled CSV parsing kludge...

Replies are listed 'Best First'.
Re^5: csv to xml
by Marshall (Canon) on Aug 06, 2016 at 17:06 UTC
    I'd say at this point, we just don't have enough info about the actual data and where it comes from. I am working with one CSV file now and I had a choice of the separator character and chose the pipe, "|", instead of comma ",". We've got a case here where the example data probably doesn't come close enough to the "real thing". The original code didn't come close to working either. If this is a "real" CSV, then Text_CSV will help.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2024-04-24 15:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found