Toolbar SelectButton not using default setup in xml

I am using the toolbar with a selectbutton in it. I am doing all the configuration via an xml string created on the server. At times, the selectbutton should have a default already selected. I have added the selected attribute as instructed in the documentation, but it is not working still. I am attaching the xml and a screenshot and the javascript snippet. I am sure it is something small I am missing.

Hmmm text file cannot be saved. I need to go re read the forum rules. Here’s the xml and js.

xml from server (captured via firebug)

<?xml version="1.0" encoding="UTF-8"?>

Javascript doing the processing of the xml

function initToolbar() {
toolbar = layout.attachToolbar();
toolbar.loadXML(“http://localhost:81/LWSIportal/xml/Inpatient/getPocToolbar/”, toolbarLoaded);
toolbar.attachEvent(“onClick”, toolbarClick);

Here is a screenshow showing nothing is selected by default.

Try to set "selected: in main option:

    <item id="poc" type="buttonSelect" mode="select" text="Select Point of Care" openAll="true" selected="poc-1">......... </item>