XML Elves

XML Elves

<community>of XML and SVG Developers</community>


How to loop throught all the childrens of a group elements

This is a discussion on How to loop throught all the childrens of a group elements within the SVG Questions forums, part of the SVG Forums category; I want to access all the child elements of a container element ex. <g> and loop through them Please help ...


Go Back   XML Elves > SVG Forums > SVG Questions

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices


Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-19-2004, 05:42 AM
chore_ashwin
Guest
 
Posts: n/a
Default How to loop throught all the childrens of a group elements

I want to access all the child elements of a container element ex. <g>
and loop through them
Please help me
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-19-2004, 06:42 AM
Anonymous
Guest
 
Posts: n/a
Default Re: How to loop throught all the childrens of a group elemen

Quote:
Originally Posted by chore_ashwin
I want to access all the child elements of a container element ex. <g>
and loop through them
Please help me
Look at childNodes in our tutorial
http://www.learnsvg.com/tutorial2/ex...childNodes.svg
If you want to get only true object, you have to test if child is object or only linefeed.
So your example will run in Batik, ASV and also Corel where only true objects are child.

Michel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-20-2004, 04:33 AM
Holger
Guest
 
Posts: n/a
Default Re: How to loop throught all the childrens of a group elemen

hi
according to peter sorotokin
Quote:
Do not use this API(NodeList::item) to loop through all the child nodes of an element. It is much more efficient to do this:
for( var ch = element.firstChild ; ch ; ch = ch.nextSibling )
{
...
}
i thought you might want to know.
Holger

Quote:
Originally Posted by Anonymous
Quote:
Originally Posted by chore_ashwin
I want to access all the child elements of a container element ex. <g>
and loop through them
Please help me
Look at childNodes in our tutorial
http://www.learnsvg.com/tutorial2/ex...childNodes.svg
If you want to get only true object, you have to test if child is object or only linefeed.
So your example will run in Batik, ASV and also Corel where only true objects are child.

Michel
[/quote]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
childrens, elements, group, loop, throught


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -6. The time now is 02:10 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

Inkjet Printer Inks
Get high quality inkjet printer inks from Prink. We have over 50,000 ink cartridges in stock. Free UK deliver on inkjet inks.

buy ink cartridge
Buy an ink cartridge from us to take advantage of our great prices and free delivery. Excellence in ink! With us, quality and value go together.

Hard disk drive data recovery lancashire
The sooner you call us, the sooner your hard disk data recovery can start. We collect from your home or office in Lancashire.

ink cartridges Free UK Delivery on ink cartridges such as Canon, Dell, Epson, hp & Lexmark.

1 2 3 4 5 6 7 8 9 10