How remove DIV elements in rendered search form in theme designing the rendered search form result in drupal 6 is

&lt;form id="search-theme-form" method="post" accept-charset="UTF-8" action="/drupalcms626/%40q%3Dcontact"&gt;
    &lt;div&gt;
        &lt;div id="edit-search-theme-form-1-wrapper" class="form-item"&gt;
        &lt;label for="edit-search-theme-form-1"&gt;Search this site: &lt;/label&gt;
        &lt;input type="text" class="form-text" title="Enter the terms you wish to search for." value="" size="15" id="edit-search-theme-form-1" name="search_theme_form" maxlength="128"&gt;
    &lt;/div&gt;
    &lt;input type="submit" class="form-submit" value="Search" id="edit-submit" name="op"&gt;
    &lt;input type="hidden" value="form-40ac94eba9b49795082bf8daf59eae58" id="form-40ac94eba9b49795082bf8daf59eae58" name="form_build_id"&gt;
    &lt;input type="hidden" value="e030363baad8b89de124a2d09bcbeaa7" id="edit-search-theme-form-form-token" name="form_token"&gt;
    &lt;input type="hidden" value="search_theme_form" id="edit-search-theme-form" name="form_id"&gt;
    &lt;/div&gt;
&lt;/form&gt;


=======================================
Now I want to remove all DIV tags in rendered result.

I mean

 1. &lt;div&gt;
 2. &lt;div id="edit-search-theme-form-1-wrapper" class="form-item"&gt;
 3. &lt;/div&gt;
 4. &lt;/div&gt;


elements

anybody knows how can I do this via theme functions in template.php or page.tpl.php or modifying other *.tpl.php files.

Please help me.
There are two theme functions you need to override:


theme_form(), in which the wrapping &lt;div&gt; is hard-coded with this line:

return '&lt;form' . drupal_attributes($element['#attributes']) . '&gt;&lt;div&gt;' . $element['#children'] . '&lt;/div&gt;&lt;/form&gt;';

theme_form_element() which contains all of the extra &lt;div&gt;s you're trying to get rid of.


The latter is quite a long function so there may well be some duplication, but I don't know how else you would do this.