in reply to XML::Smart 1.4.x vs 1.5.x

Here this is working:
use XML::Smart ; my $XML = new XML::Smart(q` <root> <output name='123'> <frames format='a'/> <frames format='b'/> </output> <output name='546'> <frames format='c'/> <frames format='d'/> </output> </root> `,'smart'); $XML = $XML->cut_root ; my $show = 123 ; my @output = @{ $XML->{output}('name','eq',$show){frames} } ; print "\n == Available Frame Formats For $show =="; foreach my $o (@output ){ print "\n $o->{format}" ; }
Output:
== Available Frame Formats For 123 == a b
This was tested with XML::Smart/1.5.9.

Graciliano M. P.
"Creativity is the expression of the liberty".

Replies are listed 'Best First'.
Re: Re: XML::Smart 1.4.x vs 1.5.x
by WMW (Initiate) on Apr 27, 2004 at 13:08 UTC
    Ok this seems to be down to how I format my XML spec file.

    -- Current -----------------------------------------------
    <main>
    <output>
      <name>StdQT</name>
      <desc>Standard Quicktime</desc>
      <spec>320x240 using square pixels, no crop and 3D LUT.</spec>
      <frames name="FullAp" format="2048x1556">
        <script>...</script>
      </frames>
      <frames name="Vista" format="3072x2048">
        <script>...</script>
      </frames>
    </output>
    </main>

    This does not work, but if I format it like so;

    -- New ---------------------------------------------------
    <main>
    <output name="StdQT">
      <desc>Standard Quicktime</desc>
      <spec>320x240 using square pixels, no crop and 3D LUT.</spec>
      <frames name="FullAp" format="2048x1556">
        <script>...</script>
      </frames>
      <frames name="Vista" format="3072x2048">
        <script>...</script>
      </frames>
    </output>
    </main>

    This does work.

    Thanks
    wmw