Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このことを考慮
Beer <br> Vodka <br> rum <br> whiskey
Beer を xpath でどのように表現しますか?
/br/preceding-sibling::text() ?
ウォッカはどうですか?ラム ?
文脈によります。理想的には、整形式の XML であるためには、シーケンスにルート要素が必要です。だとしましょう<bar/>。
<bar/>
ビール:/bar/br[1]/preceding-sibling::text()[1]
/bar/br[1]/preceding-sibling::text()[1]
ウォッカ: /bar/br[1]/following-sibling::text()[1]
/bar/br[1]/following-sibling::text()[1]
ラム酒:/bar/br[2]/following-sibling::text()[1]
/bar/br[2]/following-sibling::text()[1]