comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » read XML with IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: read XML with IDL [message #71748 is a reply to message #71672] Thu, 15 July 2010 07:05 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jul 15, 5:41 am, sh <sebastian.h...@gmail.com> wrote:
> But you have to overwrite some methods of the SAX parser to make use
> of it for a certain xml file.
> And I didn't want to write everytime a new xml_to_struct__define.pro!
>
> Therefore I asked if there is a "general" solution to take the
> elements/node/attributes names within a xml file to generate a
> structur, like in my example above. Because in this case I have only
> one parser who generates the output structure with a dependency on the
> xml elements/node/attributes names and I can read every xml file!

With IDL 8, it does not seem too difficult to write such a general
parser to generate a hash. Or, for something more complicated to
write, a class that inherited from the DOM class and presented a hash-
like interface through overloaded [].

Building a structure as the tree is parsed would always be awkward,
and the result would be difficult to edit if it involved removing
fields. But still there are situations where a structure would be more
desirable as the end product, so that is one example of the need for a
routine to create a structure from a hash, but I do not know if one
will be provided.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to allocate memory for an array of more than 2G
Next Topic: for loop isn't working

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 12:14:39 PDT 2025

Total time taken to generate the page: 0.00930 seconds