namespace definition

==problem==
<'?xml version="1.0" encoding="UTF-8"?>
<'ResBean xmlns="http: //hoge/sample/response">
<'ns1:userId xmlns:ns1="http: //hoge/sample/request">hoge<'/ns1:userId>
<'ns2:userName xmlns:ns2="http: //hoge/sample/request">piyo<'/ns2:userName>
<'/ResBean>

==solution==
change the line 2
------------
1: <'?xml version="1.0" encoding="UTF-8"?>
2: <'mapping xmlns="http: //hoge/sample/request">
3: <'class name="hoge.bean.ResBean">
4: <'map-to xml="ResBean" ns-uri="http: //hoge/sample/response"/>
5:
6: <'field name="userId" type="java.lang.String">
7: <'bind-xml name="userId" node="element"/>
8: <'/field>
9:
10: <'field name="userName" type="java.lang.String">
11: <'bind-xml name="userName" node="element"/>
12: <'/field>
13:
14: <'/class>
15: <'/mapping>
------------
into
------------
1: <'?xml version="1.0" encoding="UTF-8"?>
2: <'mapping xmlns="http: //hoge/sample/response">
3: <'class name="hoge.bean.ResBean">
4: <'map-to xml="ResBean" ns-uri="http: //hoge/sample/response"/>
5:
6: <'field name="userId" type="java.lang.String">
7: <'bind-xml name="userId" node="element"/>
8: <'/field>
9:
10: <'field name="userName" type="java.lang.String">
11: <'bind-xml name="userName" node="element"/>
12: <'/field>
13:
14: <'/class>
15: <'/mapping>
------------


==result==
<'?xml version="1.0" encoding="UTF-8"?>
<'ResBean xmlns="http: //hoge/sample/response">
<'userId>hoge<'/userId>
<'userName>piyo<'/userName>
<'/ResBean>
2008-01-20 23:15 : __lang__xml : コメント : 0 : トラックバック : 0 :
コメントの投稿
非公開コメント

« next  ホーム  prev »

search

ad



counter


tag cloud

category cloud