xml¸ñʽ»ñȡֵ
function getkeyvalue(s_keyname,s_keystr)
s_keybegin="<"+s_keyname+">"
s_keyend="</"+s_keyname+">"
s_i_begin=instr(s_keystr,s_keybegin)
s_i_end=instr(s_keystr,s_keyend)
if s_i_end<=s_i_begin+len(s_keybegin) then
getkeyvalue=""
exit function
else
getkeyvalue=mid(s_keystr,s_i_begin+len(s_keybegin),s_i_end-s_i_begin-len(s_keybegin))
exit function
end if
end function
function setkeyvalue(s_keyname,s_keystr,s_keyvalue)
if isnull(s_keyvalue) then
setkeyvalue=s_keystr
exit function
end if
s_keybegin="<"+s_keyname+">"
s_keyend="</"+s_keyname+">"
s_i_begin=instr(s_keystr,s_keybegin)
s_i_end=instr(s_keystr,s_keyend)
if s_i_end<=s_i_begin+len(s_keybegin) then
setkeyvalue=s_keystr+s_keybegin+s_keyvalue+s_keyend
exit function
else
setkeyvalue=mid(s_keystr,1,s_i_begin-1)+s_keybegin+s_keyvalue+s_keyend+mid(s_keystr,s_i_end+len(s_keyend))
exit function
end if
end function
Ïà¹ØÎĵµ£º
If XML data in the table is less than 32K for each record, then you can directly unload the data as char. If XML data exceeds 32K for some records, then you have to unload the common data and the XML data separately. First, create a template for unloading XML into a PDS: TEMPLATE LOBFRV DSN 'AAA. ......
<?xml version="1.0" encoding="UTF-8"?>
<projects>
<node Country="°µ°µ°¡" Gold="10" Silver="20" Bronze="30"/>
<node Country="°×°ß²¡" Gold="30" Silver="20" Bronze="10"/>
<node Country="³£³£³§" Gold="20" Silver="40" Bronze="60"/>
<node Country="¶Ä¶«µÀ" Gold="5 ......
ͨ¹ýJOXÇáËÉʵÏÖJavaBeansÓëXMLµÄÏ໥ת»»
JOXʹµÃÔÚXMLÎĵµÓëJava BeansÖ®¼ä½øÐÐÊý¾Ýת»»±äµÃÈÝÒ×.Äã¿ÉÒÔÀûÓÃJOXÀ´½«¶ÔÏóÐòÁл¯µ½XML.
¿ª·¢ÓïÑÔ£º Java
²Ù×÷ϵͳ£º
Èí¼þÖ÷Ò³£º http://www.wutka.com/jox.html
ÎĵµµØÖ·£º http://www.wutka.com/joxdoc.html
ÏÂÔØµ ......
»ùÓÚdom4jµÄXML¸ñʽת»¯Àà
package com.lixi.util;
import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import org.dom4j.Document;
import org.do ......
XML How to Program
Beginning Xml Databases
Beginning XSLT and XPath Transforming XML Documents and Data
ASP.NET 2.0 XML
XML ÊÖ²á 4th Edition
XML Schema Complete Reference
......