# css-javascript-toolbox/12.0.6/framework/xml/fetchscalars.php

CSS &amp; JavaScript Toolbox, version 12.0.6. 32 lines.

- Page: https://pluginprobe.com/plugins/css-javascript-toolbox/12.0.6/code/framework/xml/fetchscalars.php
- Raw: https://pluginprobe.com/plugins/css-javascript-toolbox/12.0.6/raw/framework/xml/fetchscalars.php
- Modified: 2025-10-28T13:57:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/css-javascript-toolbox/12.0.6/code/framework/xml/fetchscalars.php#L10-L20`.

```php
<?php
/**
* 
*/

/**
* 
*/
class CJT_Framework_Xml_Fetchscalars extends ArrayIterator {
	
	/**
	* put your comment there...
	* 
	* @param SimpleXMLElement $element
	* @return CJT_Framework_Xml_Fetchscalars
	*/
	public function __construct(SimpleXMLElement $element) {
		$data = array();
		// Read all Child elements with no childs inside.
		foreach ($element->children() as $field => $child) {
			// Read all elements with no childs inside!
			// Only with text data!
			if (!count($child->children())) {
				$data[$field] = (string) $child;
			}
		}
		// Load array iterator with fetched data.
		parent::__construct($data);
	}
	
	
} // End class.
```
