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

Home » Public Forums » archive » Another XML Question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Another XML Question [message #43081] Tue, 22 March 2005 09:42 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

OK, I'm lost again. :-(

I have an XML file that looks like this:

<CONFIGDATA>
<CAMPAIGN_ID>
<TYPE>INT</TYPE>
<VALUE>00</VALUE>
</CAMPAIGN_ID>
<SPAM_WAIT>
<TYPE>INT</TYPE>
<VALUE>60</VALUE>
<UNITS>sec</UNITS>
</SPAM_WAIT>
<HEARTBEAT_TIME>
<TYPE>INT</TYPE>
<VALUE>60</VALUE>
<UNITS>sec<UNITS>
</HEARTBEAT_TIME>
</CONFIGDATA>

I wish to make widgets that look something like this:

field = FSC_Field(tlb, Title='CAMPAIGN_ID' + '', Value=0, /Integer)
field = FSC_Field(tlb, Title='SPAM_WAIT' + ' (sec)', Value=60)
field = FSC_Field(tlb, Title='HEARTBEAT_TIME + ' (sec)', Value=60)

Naturally, I wish to make then in a generic fashion from the XML
file.

I cannot figure out how to pull out the information from
the CAMPAIGN_ID element for example:

name: CAMPAIGN_ID
value: 00
units: n/a

Without knowing in my code that the element CAMPAIGN_ID exists.

I guess my question is this: How can I find all the sub-elements
of CONFIGDATA in a generic way? (I can find ALL the elements in the
file, but what I want is the first sub-elements of CONFIGDATA, then
all of *its* sub-elements, etc.) I find the documentation uh, vague. :-(

Thanks.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Little CREATE_STRUCT issue
Next Topic: LINUX Device Question

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

Current Time: Tue Dec 02 19:32:26 PST 2025

Total time taken to generate the page: 1.28120 seconds