Hi

Our group has to generate file in IFF format which is
similar to XML format.

Another group does the processing of this file and
loads into a Oracle database.

I am not sure how the parser works. 

I will ask them to provide more information.

Even the tags are out of order

   for eg

  For a certain datafile   I added tags like following

        <IFF_SOURCE>
            <IFF_HEADER>
            <IFF_DATALOG>
            </IFF_DATALOG>
        </IFF_SOURCE>
          

   When I use XMLout I see the following output

       <IFF_SOURCE>
          <IFF_DATALOG>
          </IFF_DATALOG>
          <IFF_HEADER Parser = "0.1" />
       </IFF_SOURCE>


  As we are using hash references, looks like we can't
put the tags in the order it got entered.

Does the tag ordering matters for XML parser?

I will also check with the group that uses this IFF
file as input and find out whether the ordering of the
tag  matters.

Thanks for your reply.

-Nirai
--- Michel Rodriguez <[EMAIL PROTECTED]> wrote:

> Niraikalai Vijay wrote:
> 
> > I am using XML::Simple to generate XML file for a
> data
> > file.
> > 
> > As XMLout uses hash variable,  the tags
> ,attributes
> > for the tags that got populated comes out in
> random
> > order.
> > 
> > But I need to generate XML file with the tags
> comes
> > out in the order they got added.
> 
> Why? The attribute order is traditionally
> irrelevent, and should not 
> matter to any proper XML parser that parses the data
> file. If the data 
> is not processed using a parser... then really you
> (or the consumer of 
> the data at least) are not really working with XML.
> 
> The only application I have heard of that would need
> the order to be 
> preserved is some Microsoft VB tool I think. And of
> course XML editors.
> 
> > Is there any solution to avoid this randomness of
> hash
> > values?
> 
> Probably not with XML::Simple. You can create
> "ordered" hashes using 
> Tie::IxHash and see where that leads you, but the
> last time I tried 
> tie-ing the hashes that XML::Simple uses was quite
> frustrating: the code 
> does a lot of re-creating hashes, and so looses the
> tie-ed-ness. At 
> least that was on the parsing side, maybe the
> writing part of the code 
> is simpler.
> 
> -- 
> Michel Rodriguez
> Perl &amp; XML
> xmltwig.com
> 



        
                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to