Method: WirisPlugin::WXmlUtils.getChildElementCount
- Defined in:
- lib/com/wiris/util/xml/WXmlUtils.rb
.getChildElementCount(parent) ⇒ Object
479 480 481 482 483 484 485 486 487 488 489 490 |
# File 'lib/com/wiris/util/xml/WXmlUtils.rb', line 479 def self.getChildElementCount(parent) if (parent::nodeType != Xml::Element) && (parent::nodeType != Xml::Document) return 0 end it = parent::elements() count = 0 while it::hasNext() it::next() count+=1 end return count end |