userdata when loading from dom + get children of specific i

Hello.I have two questions.
The first one is how can i insert userdata when loading from the dom.
And the second one is how can i get the children of a specific id.
Thank you in advance!

Hello
What component are you asking about?
Give an example of initialization.

I’m talking about the Menu component. Please let me know!

[code]

menu
[/code]

Userdata can be set data structure only if you are using xml.

In case of other data sources, you should use setUserData method:

menu.setUserData(itemId,udName,udValue);

Thank you.
Any ideas on how can i get the children of a specific id.

There is not such a public method. You may define the new method for the method - getChildren as follows:
dhtmlXMenuObject.prototype.getChildren = function(node) {
node = this.idPrefix+node;
var m = new Array;
for (var a in this.itemPull) { if (this.itemPull[a][“parent”] == node) { m[m.length] = a.replace(this.idPrefix,""); } }
return m;
};

It returns the array of child ids. The example of usage:

var children = menu.getChildren(“edit”);

Thank you very much.