ArrayList从xml读取数据
ArrayAdapter adapter =
ArrayAdapter.createfromResource(
this,
R.array.catalog,
android.R.layout.simple_list_item_1);
this.setListAdapter(adapter);
xml文件
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="catalog">
<item>文学书籍</item>
<item>艺术书籍</item>
<item>技术书籍</item>
</string-array>
</resources>
相关文档:
导入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
{
& ......
public sealed class XmlHelper
{
public static void Serialize<T>(T obj,string fileName)
{
TextWriter writer = new StreamWriter(fileName);
try
{
XmlSerializer ser = new XmlSerializer(typeof(T));
......
package demo.oath ;
import org.jdom.* ;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class AccountHelper
{
......
当在Perl中使用XML时,你会有将近五百个CPAN模块可以选择,每一个都支持整合Web服务的不同方面。此外,Perl的核心库包括多个支持XML的模块。这篇文章就关注于一个最早期且涉及最频繁的核心模块:XML::Parser.
XML::解析器系列
最初的Perl解析器XML::Parser::Expat由Larry Wall在几年前编写并由Clark Cooper保持延续。模 ......