android xml dom½âÊÍ
private
NodeList root(
final
String url ,
final
String str){
NodeList root =
null
;
try
{
InputSource is=
new
InputSource(
new
InputStreamReader(
new
URL(url).openStream()));
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance
();
DocumentBuilder dom = factory.newDocumentBuilder();
Document doc = dom.parse(is);
root = doc.getElementsByTagName(str);
}
catch
(Exception e){
e.printStackTrace();
}
return
root;
}
Ïà¹ØÎĵµ£º
DECLARE @x xml
SET @x='
<root>
<ShopAccount>
<ActivityType>IA - PM Standing WO (for LPI report)</ActivityType>
<ProjectNo>R</ProjectNo>
</ShopAccount>
<ShopAccount>
......
ͨ¹ýJOXÇáËÉʵÏÖJavaBeansÓëXMLµÄÏ໥ת»»
JOXʹµÃÔÚXMLÎĵµÓëJava BeansÖ®¼ä½øÐÐÊý¾Ýת»»±äµÃÈÝÒ×.Äã¿ÉÒÔÀûÓÃJOXÀ´½«¶ÔÏóÐòÁл¯µ½XML.
¿ª·¢ÓïÑÔ£º Java
²Ù×÷ϵͳ£º
Èí¼þÖ÷Ò³£º http://www.wutka.com/jox.html
ÎĵµµØÖ·£º http://www.wutka.com/joxdoc.html
ÏÂÔØµ ......
XStreamʹÓÃ
XStreamÊÇÒ»¸öJava¶ÔÏóºÍXMLÏ໥ת»»µÄ¹¤¾ß£¬ºÜºÃºÜÇ¿´ó¡£ÌṩÁËËùÓеĻù´¡ÀàÐÍ¡¢Êý×é¡¢¼¯ºÏµÈÀàÐÍÖ±½Óת»»µÄÖ§³Ö¡£Òò´ËXML³£ÓÃÓÚÊý¾Ý½»»»¡¢¶ÔÏóÐòÁл¯£¨ÕâÖÖÐòÁл¯ºÍJava¶ÔÏóµÄÐòÁл¯¼¼ÊõÓÐ×ű¾ÖʵÄÇø±ð£©¡£
XStreamÖеĺËÐÄÀà¾ÍÊÇXStreamÀ࣬һ°ãÀ´Ëµ£¬ÊìϤÕâ¸öÀà»ù±¾¾Í¹»ÓÃÁË£¬Èç¹ûÄãÓõĸü¶à£¬¹À¼ÆÊÇÄ ......
Introduction to XML and XML With Java
If you are looking for sample programs to parse a XML file using DOM/SAX parser or looking for a program to generate a XML file please proceed directly to programs.
This small tutorial introduces you to the basic concepts of XML and using Xer ......
ÔںܶàÇé¿öÏÂ, ÎÒÃÇ»áÓõ½XML,±ÈÈç˵ÅäÖÃÎļþµÈ.C#ÌṩÁËXMLÀà.
ÕâÀïÎÒÖ»ÊǼòµ¥µÄдһÏÂXMLÎļþµÄÉú³É,½âÎö¾Í²»¶à˵ÁË.
µÚÒ»ÖÖ·½·¨
DataBase db = DataBaseFactory.CreateDataBase(DataBaseType.MySql, strMysql);
......