Hi,
This code read all group of <support_composants> but only the first line of each group.
Can you help me please?
Thanks
Rom
{code saved}
Hi David,
Thanks for the reply but i have always the same problem..
Rom
Sorry Rom, I wasn't quite right in the new Format String. Use:
xml|penelop/donnee_reguliere/DESTINATAIRE/CONTRATS/CONTRAT/SUPPORT_COMPOSANTS/SUPPORT_COMPOSANT/
The new key values into $record2 are correct still...
Hope this helps!
Cheers,
David.
I have tried but now I have "invalid format string".
I don't know what can I do..
Thanks
Hi Rom,
Could you check it is all on one line - {link saved} to see that Format String working in the demo tool; if you're not sure, could you post the section of your code calling MagicParser_parse and i'll check it out...
I made tests between... Correction for the last post i have :
MagicParser_parse($xml,"myRecordHandler2","penelop/donnee_reguliere/DESTINATAIRE/CONTRATS/CONTRAT/SUPPORT_COMPOSANTS/SUPPORT_COMPOSANT");
Hi Rom,
the XML| and trailing / are missing - please try;
MagicParser_parse($xml,"myRecordHandler2","XML|penelop/donnee_reguliere/DESTINATAIRE/CONTRATS/CONTRAT/SUPPORT_COMPOSANTS/SUPPORT_COMPOSANT/");
(make sure all on one line of course)
That should be all it is!
Cheers,
David.
Hi David,
ok.. Sorry.
it's works but the result is the same. I have only the first line of each group.
Rom
Hi Rom,
I think you want to parse at one level lower, using the Format String:
xml|penelop/donnee_reguliere/DESTINATAIRE/CONTRATS/CONTRAT/SUPPORT_COMPOSANTS/
And then, in your myRecordHandler2 function, for each key instead of, for example:
$record2["SUPPORT_COMPOSANTS/SUPPORT_COMPOSANT-ID_SUPPORT_COMPOSANT"]
...use:
$record2["SUPPORT_COMPOSANT-ID_SUPPORT_COMPOSANT"]
Then you should get all <support_composants> into your myRecordHandler2 function!
Hope this helps,
Cheers
David
--
MagicParser.com