Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: Parsing XML with XML::Simple

by madbombX (Hermit)
on Dec 18, 2006 at 01:22 UTC ( #590372=note: print w/replies, xml ) Need Help??


in reply to Re^3: Parsing XML with XML::Simple
in thread Parsing XML with XML::Simple

I am using XML::Simple version 2.14. I came into this because part of my company policy requires us, in our CVS headers to have that line as part of the template for documents/scripts/etc that go into CVS. Therefore, the XML files that are turned into articles all have those within the top 5 lines. Neither XML::Simple or XML::Twig handle this properly.

Replies are listed 'Best First'.
Re^5: Parsing XML with XML::Simple
by GrandFather (Sage) on Dec 18, 2006 at 01:30 UTC

    So you are suggesting that the XML::Simple file is post-processed in some fashion to insert extra information? The fix in that case is to pre-process the file at the other end to remove said extra information. Alternatively the code using XML::Simple to generate the file might be modified to insert the extra information in a compliant fashion. At this point it depends rather on your data flow and processes.


    DWIM is Perl's answer to Gödel
Re^5: Parsing XML with XML::Simple
by Jenda (Abbot) on Dec 18, 2006 at 21:12 UTC

    If you need the CSV info accessible to the programs you need to enclose the content in <[CDATA[...]]> to make sure the <, > and & characters do not break the XML, if you don't it would be best to use comments:

    <!-- CVS $Id: File_Find.pl,v 1.1 2006-12-17 19:25:03 eric Exp $ This That <this@that.com> Desc: Test file --> <root> ...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://590372]
help
Chatterbox?
[Corion]: Oh yay. The (external, not guided by me) programmers have chosen Moose+DBIx::Class for some implementation, and now seem to do 1+n SELECT statements for each row, as is usual when using ORMs.
[Corion]: So maybe I should investigate how to plug in a cache in front of DBIx::Class so I can do a ->selectall_hashre f and then satisfy the "sub"-selects from that cached single SELECT statement ...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2017-09-25 10:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (279 votes). Check out past polls.

    Notices?