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;
}
相关文档:
写XML:
protected void btnSave_Click(object sender, EventArgs e)
{
//权限判断
XmlTextWriter xmlw = new XmlTextWriter(Server.MapPath("~\\") + "FriendLink.xml", Encoding.Ge ......
导入jdom1.1版
http://www.jdom.org/dist/binary/
import java.io.FileReader;
import org.jdom.Document;
import org.jdom.input.SAXBuilder;
public class XMLValidate {
public void validate(String xml, String schema) {
try {
SAXBuilder builder = new SAXBuilder(true);
//指定约束方 ......
using System;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
// 添加引用 -> .NET -> Microsoft.Office.Interop.Excel(2003->11.0, 2007->12.0)
namespace WinFormTable
{
& ......
对于小型数据存储很方便。
但多了就要遇到IO瓶颈。
另外,XML格式比较通用。
一般来说,复杂型的数据存储还是用数据库好些。处理方便。而且效率高。
通用性强,可以在任何平台上使用。小型的数据都可以使用XML。
缺点就是有一个缓存的问题
1)XML可以用于本地计算的数据。传递到桌面的数据可以进行本地计算。XM ......