hello,
thank you for your remarks. a sample of the code I am trying to parse:
<?xml version="1.0" encoding="UTF-8" ?> <vxml version="1.0" application="news_root.xml"> <form id="Kategorie"> <field name="kategorie"> <grammar src="gram/kategorie.grammar"/> <prompt bargein="true"> <audio src="http://xxx.61.xxx.xxx/audio/portal/news/10.wav +">xaxaxaxa</audio> <audio src="http://xxx.xxx.xxx.xxx/audio/portal/news/input_sta +rt.wav">xaxaxaxa</audio> </prompt> <filled> <audio src="http://xxx.xxx.xxx.xxx/audio/portal/common/inp +ut_end.wav">input end</audio> <if cond="kategorie == 'menue'"><goto next="../index.jsp"/ +><elseif cond="kategorie == 'schlagzeilen'"/><goto next="#Schlagzeile +n"/><elseif cond="kategorie == 'wirtschaft'"/><goto next="#Wirtschaft +"/><elseif cond="kategorie == 'boerse'"/><goto next="#Boerse"/><elsei +f cond="kategorie == 'sport'"/><goto next="#Sport"/><elseif cond="kat +egorie == 'unterhaltung'"/><goto next="#Unterhaltung"/><else/><clear +namelist="kategorie"/>123.123.123.123/nee<reprompt/></if> </filled> </field> <noinput count="1"> <audio src="http://xxx.xxx.xxx.xxx/audio/portal/common/noinput +.wav">noinput</audio> <audio src="http://xxx.xxx.xxx.xxx/audio/portal/news/40.wav">I +ch habe sie wirklich nicht gehoert.</audio> <audio src="http://xxx.xxx.xxx.xxx/audio/portal/common/pauses/ +500.wav">kleine Pause</audio> <audio src="http://xxx.xxx.xxx.xxx/audio/portal/news/input_sta +rt.wav">input start</audio> </noinput> <noinput count="2"> <audio src="http://xxx.xxx.xxx.xxx/audio/portal/common/noinput +.wav">noinput</audio> <audio src="http://xxx.xxx.xxx.xxx/audio/portal/news/50.wav">I +ch habe sie wirklich nicht gehoert.</audio> <audio src="http://xxx.xxx.xxx.xxx/audio/portal/common/pauses/ +500.wav">kleine Pause</audio> <audio src="http://xxx.xxx.xxx.xxx/audio/portal/news/input_sta +rt.wav">input start</audio> </noinput> </form> </vxml>
I will implement the first point, and post further feedback. If there is a "well-formed-ness" error in the code above, it is because I triaged a bit, the document itself is longer (and validates).
A further note: The point I want to reach is to have all the audio and goto tags in a hash, if my approach is totally wrong please warn me.

thanks again, jan

In reply to Re: Re: looping over xml by Micz
in thread looping over xml by Micz

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.