Thanks for your answer Mirod!

Lets answer to all your questions and comment :

I only included 1 record in the output just to show an example of what informations I'm interested in. As my XML file does 18 megs, I've truncated it to.... Zipped XML does 1Meg so if it can help you, I can mail it to you...

I've put the full USERSQL content back for you ;)

I fully agree with you when you say the file is clumsy but it's the one I have to work on :(

The output I would like to get after parsing the demo XML tree should be exactly like this in the best case :

<Job Identifier="adresses"> <TABLE>APPS.RA_ADDRESSES_ALL</TABLE> <USERSQL>SELECT ADDRESS_ID,LAST_UPDATE_DATE,LAST_UPDATE +D_BY,CREATION_DATE,CREATED_BY,COUNTRY,ADDRESS1,ADDRESS2,ADDRESS3,ADDR +ESS4,CITY,POSTAL_CODE,STATE,PROVINCE,COUNTY FROM APPS.RA_ADDRESSES_AL +L WHERE LAST_UPDATE_DATE&gt;=(SELECT LAST_LOADING_DATE from DWADMIN.I +NT_LOADINGS@#DB_LINK# WHERE TABLE_NAME = &apos;CUS_ADDRESSES&apos; AND SYSTEM_ORIGIN = &apos;#system_origin#&apos; ) </USERSQL> <TABLE>DWADMIN.CUS_ADDRESSES</TABLE> <USERSQL>INSERT INTO DWADMIN.CUS_ADDRESSES ( ADDRESS_ID, ORIGINAL_ADDRESS_ID, ADDRESS_1,ADDRESS_2, A +DDRESS_3, ADDRESS_4,CITY,ZIP_CODE, COUNTRY,ADD_INFORMATION_1,ADD_INFORMATION_2,ADD_INFORMA +TION_3,EMAIL,CREATED_BY,CREATION_DATE, LAST_UPDATED_BY,LAST_UPDATE_DATE,SYSTEM_ORIGIN,SALES_TE +RRITORY_COUNTRY, SALES_TERRITORY_ADMIN_REGION,SALES_TERRITORY_SECTOR,SAL +ESREP_ID) VALUES (DWADMIN.CUS_ADDRESS_ID_SEQ.NEXTVAL,:1,:2,:3,:4, +:5,:6,:7,:8,:9,:10,:11,:12,:13, TO_DATE(:14, &apos;YYYY-MM-DD HH24:MI:SS&apos;),: 15,TO_DATE(:16, &apos;YYYY-MM-DD HH24:MI:SS&apos;),:17, +:18,:19,:20,:21) </USERSQL> </Job>
As you can see I'm totally new to Twig and can't understang how that thing works exactly...Thanks for you precious help.

In reply to Re^4: XML::Twig usage incomprehension by Jerome
in thread XML::Twig usage incomprehension by Jerome

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.