Re: read any kind of XML file [message #71072] |
Fri, 28 May 2010 15:49 |
Karl[1]
Messages: 79 Registered: October 2005
|
Member |
|
|
On May 28, 3:08 pm, nata <bernat.puigdomen...@gmail.com> wrote:
> Hi guys,
>
> I know that, normally, when we want to read a XML file, we know the
> content of the file and then we can create the program to read that
> file. The problem is when we have N files, then we have to create N
> different programs to read all the different contents.
>
> I was wondering if it's possible to create a standard routine to read
> any kind of XML file. Actually, I tried to write this routine some
> time ago but the result is always a simple struct, with only one
> level, containing the information.
> A good standard routine should respect the indentation and create
> structs into structs, if it's the case.
>
> So, do you have a routine to do this stuff ?
> If you want to share something, I'll really appreciate that !
>
> If you think that you can help me with the code that I already have, I
> can share that code. Any help is appreciated
> rata
You Really Should look at the IDLffXMLSAX and IDLffXMLDOM XML parsers
that are built into IDL.
The programmer's guide should include some sample code that does a
simple traversal of the XML document structure.
There are facilities for dealing with (ignorable) whitespace, which is
what I think you are getting at by "respecting indentation".
|
|
|