Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-19-2007, 12:35 AM
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?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-24-2007, 02:44 AM
Member
 
Join Date: Jul 2007
Posts: 41
tommy is on a distinguished road
You need to create a Text node for each value and append the nodes to their respective "option" nodes
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Menu on phone number option of a list Poonam CLDC and MIDP 7 01-31-2008 02:42 PM
the -eprof option? GVD Advanced Java 2 01-10-2008 02:48 PM
Axis 1.4 xerces memory leaks hlaprade Advanced Java 0 12-11-2007 01:42 AM
Getting values of an Option List mutuah Advanced Java 0 08-07-2007 04:42 AM
Is there a way to remove an option from optionsCollection? schu777 JavaServer Pages (JSP) and JSTL 0 08-02-2007 10:47 PM


All times are GMT +3. The time now is 11:38 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org