在 C# 中,我需要访问嵌套在许多其他元素中的元素。我可以通过命名所有元素来编写查询,但这会非常耗时。有没有简单的方法可以做到这一点,或者可能有一些发电机?
例如我有一个xml:
<div id="list_offers"> <div class="container"> <div id="header"> <div class="row"> <div class="space-on-sides"> <div class="sixteen columns relative"> <div class="logo"> <a href="/"> <img src="/images/design_resp/design/logo_profesia.png" width="113" height="76" alt="PROFESIA.SK - práca, zamestnanie, ponuky práce, brigáda, voÄľnĂ© pracovnĂ© miesto" title="PROFESIA.SK - práca, zamestnanie, ponuky práce, brigáda, voÄľnĂ© pracovnĂ© miesto" /> </a> </div> <div class="right-panel"> <a class="login-company small red button nice radius right hide-on-phones margin-on-left" title="Vstup pre firmy" href="/login_person.php?action=company_login">Vstup pre firmy</a> <a class="login-company small red button nice radius right show-on-phones margin-on-left" href="/login_person.php?action=company_login">Firmy</a> <a rel="nofollow" id="login_modal" class="small gray button nice radius right" title="Prihláste sa do konta" href="/login_person.php?action=login">PrihlásiĹĄ</a> <div class="search"> <div class="relative hide-on-phones"> <form name="fulltextsearch" id="fulltextsearch" action="/search.php" method="get" onsubmit="if(document.getElementById('search').value=='HÄľadanie') return false; return true;" class="nice" /> <input name="which_form" type="hidden" value="simple" /> <input name="tab_name" type="hidden" /> <input name="search_anywhere" type="text" id="search" placeholder="HÄľadanie" tabindex="1" class="input-text expand" /> <input name="submit_search_simple" type="image" src="/images/design_resp/design/blank.png" alt="HÄľadaĹĄ" class="ico search-nosprite" /></form> </div> <div class="show-on-phones"> <a title="HÄľadajte ponuky práce podÄľa rĂ´znych kritĂ©riĂ"> </a> </div> </div> <div class="row-header-favorite"> <div class="header-favorite"> <a title="Moje vybranĂ© pracovnĂ© ponuky" class="ico-shopping-cart-toppanel" rel="nofollow" href="/user_details.php?action=show_my_offers&ref_top_panel=157">0</a> </div> </div> </div> </div> </div> </div> </div> </div> </div>
我需要访问:
输入名称="tab_name" 类型="隐藏"