asp读取XML文件
<%
'
Set http=Server.CreateObject("Microsoft.XMLHTTP")
http.Open "GET","http://127.0.0.1/1.xml",False
http.send
Dim xml
Set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = False
'xml.load (Server.MapPath("1.xml")) '如果不是远程文件直接这一步
xml.Load(http.ResponseXML)
Dim title, heading, paragraph, ii
title = xml.documentElement.childNodes(0).text
heading = xml.documentElement.childNodes(1).text
paragraph = xml.documentElement.childNodes(1).childNodes(1).childNodes(0).text
ii = xml.documentElement.childNodes(1).childNodes.length
dim i
for i=0 to ii-1
response.Write(i)
response.Write(xml.documentElement.childNodes(1).childNodes(i).childNodes(1).text)
response.Write("<br />")
next
Set xml = Nothing
%>
相关文档:
/*
练习使用java.util.properties类包来操作propertes及XML文件,通过store方法的调用可实现xml/properties文件的相互保存转化
*/
import java.util.*;
import java.io.*;
public class TestPropertes
{
public static void main(String[] args) {
Properties pp = new Properties();
Fi ......
由于项目的需要去Google搜了一下 ,还真多
记得“想当年”某天上午在这里路过,看到一位朋友贴的自己写的验证码程序,虽然他的程序是黑白有杂点,但其实很容易被破解的,但却有不少人喜欢着。。。没办法,当天下午研究了一翻 BMP 图片,然后就写出了这些代码,只是当初没有公布,眼看今天这么多坏人乱在很多论坛 ......
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:XML id="xmlSource">
<node label="grandFather" state="unchecked">
<node label="Father" state="un ......
个人收集、整理了一些LINQ TO XML的基本方法,希望各位大虾多多指导:
/// <summary>
///Xml节点属性
/// </summary>
public class XmlAttribute
{
public XmlAttribute()
{
}
public XmlAttribute(string _key,object _value)
&nbs ......
package com.pk.xml;
import java.io.File;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
public class Dom4j {
public static void main(String[] args) {
try {
//获得SAX解析器
SAXReader reader = new SAXReader();
//解析文件
File file = n ......