[英]Pass and deal xml document with multiple tags in apache camel mybatis
假設我有這樣的文檔:
<?xml version="1.0" encoding="UTF-8" ?>
<main>
<sub>1</sub>
<sub>2</sub>
<sub>3</sub>
<sub>4</sub>
<!-- and many, many elements like sub here don't know count of it -->
</main>
我該如何應對呢?
我的意思是我想檢查我的值是否等於此xml中的任何值。
select * from table
where value in (and here is this xml document)
有可能做這樣的事情嗎?
有兩種實現方法。 第一個是使用XPATH並獲取值列表,並將其傳遞給iBatis調用。 第二個方法是嘗試將XML解組到POJO(使用JAXB等),然后提取值並調用iBatis。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.