View Single Post
  #1 (permalink)  
Old 07-19-2007, 01:35 AM
oregon oregon is offline
Member
 
Join Date: Jul 2007
Posts: 41
oregon is on a distinguished road
problem with XERCES Parser using Option FieldType
I want to generate a Option FieldType of a HTMLForm.

My code:

Code:
Element select = sourceDoc.createElement("select"); select.setAttribute("name", name); select.setAttribute("required", required); if (Numitems > 0){ for(int k=0;k<Numitems;k++){ Element option = sourceDoc.createElement("option"); option.setAttribute("value", items[k]); select.appendChild(option); }}
and after that it generates:
Code:
<select name="form/camp1" required="true" value=""> <option value="hi"/> <option value="good bye"/> <option value="peich"/> </select>

But I want that the parser result be:
Code:
<select name="form/camp1" required="true" value=""> <option value="hi" HI</option> <option value="good bye" GOOD BYE</option> <option value="peich" PEICH </option> </select>
any ideas?
Reply With Quote
Sponsored Links