Xml Код
<directory>
<fieldset>
<field id="displayName">Display name</field>
</fieldset>
<employees>
<employee id="123">
<field id="displayName">John Doe</field>
</employee>
<employee id="160">
<field id="displayName">Jane Doe</field>
</employee>
Я могу проанализировать информацию с помощью XmlService.parse и получить значение в каждом элементе, но я не могу получить номер идентификатора сотрудника / элемента
Когда Я запускаю это:
var roots = document.getRootElement().getChild('employees').getChildren();
Я получаю отдельные элементы, но не могу получить идентификатор
[[Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>], [Element: <employee/>]]