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

Home » Public Forums » archive » GetLastChild
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: GetLastChild [message #73076 is a reply to message #72960] Fri, 22 October 2010 08:42 Go to previous messageGo to previous message
Truong Le is currently offline  Truong Le
Messages: 42
Registered: September 2010
Member
On Oct 22, 11:04 am, Truong Le <truong...@gmail.com> wrote:
> On Oct 21, 7:29 pm, David Fanning <n...@dfanning.com> wrote:
>
>> Doug Edmundson writes:
>>> The ALL_CHILDREN and N_CHILDREN keywords to WIDGET_INFO() should do the
>>> trick.
>
>> Better than my low-tech solution, probably. ;-)
>
>> Cheers,
>
>> David
>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
> Hi All,
>
> Thank you for responses. I am pretty new to all these. However, I want
> to get the last child using
> the similar method that I get for the first child without using the
> "item" keyword.
> Below is how I go about obtaining the value of the first child.
>
>   doc = OBJ_NEW('IDLffXMLDOMDocument', FILENAME=filename)
>   elementValue = ((((doc->GetFirstChild())-> $
>     GetElementsByTagName(elementName))->item(0))-> $
>     GetFirstChild())->GetNodeValue()
>
> Thanks,
>
> Truong

Okay, I think I found a way to resolve my problem, and here it is.

doc = OBJ_NEW('IDLffXMLDOMDocument', FILENAME=filename)
totalChild = (((doc->GetLastChild())-> $
GetElementsByTagName(elementName)))-> $
GetLength()

elementValue = ((((doc->GetFirstChild())-> $
GetElementsByTagName(elementName))->item(totalChild-1))-> $
GetFirstChild())->GetNodeValue()


Thank you all!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: FTGET error
Next Topic: Re: PostScript and TrueColor images

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

Current Time: Sat Oct 11 03:35:01 PDT 2025

Total time taken to generate the page: 2.23817 seconds