易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 : xml

flex xml遍历

<?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="unchecked">
            <node label="son" state="unchecked">
                <node label="1001" state="unchecked">
                    <node label="100101" state="unchecked">
                    </node>
                </node>
            </node>
        </node>
        <node label="Uncle3" state="unchecked">
            ......

flex xml遍历

<?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="unchecked">
            <node label="son" state="unchecked">
                <node label="1001" state="unchecked">
                    <node label="100101" state="unchecked">
                    </node>
                </node>
            </node>
        </node>
        <node label="Uncle3" state="unchecked">
            ......

xml的分页程序

test.html  
  ————————————————————————————————————————————————————  
  <HTML>  
  <HEAD>  
  <SCRIPT   for="window"   event="onload">  
  var   xmldoc=xmldso.XMLDocument;  
  xmldoc.load("conference5.xml");  
  </SCRIPT>  
  </HEAD>  
   
  <BODY>  
      <H1   align="center">分页显示XML元素</H1>  
      <HR   size="5"   width="80%">  
   
  <OBJECT   width="0"   height="0"  
  classid="c ......

XML的创建

       声明
        /// <summary>
        /// XML文档
        /// </summary>
        XmlDocument xmldoc;
        /// <summary>
        /// XML节点
        /// </summary>
        XmlNode xmlnode;
        /// <summary>
        /// XML元素
        /// </summary>
        XmlElement xmlelem;
        XmlElement xmlelem2;
        XmlElement xmlelem3;
        /// <summary>
   & ......

LINQ TO XML Common Class

个人收集、整理了一些LINQ TO XML的基本方法,希望各位大虾多多指导:
 /// <summary>
///Xml节点属性
/// </summary>
public class XmlAttribute
{
 public XmlAttribute()
 {
  
 }
    public XmlAttribute(string _key,object _value)
    {
        Key = _key;
        Value = _value;
    }
    /// <summary>
    /// 节点属性名
    /// </summary>
    public string Key { get; set; }
    /// <summary>
    /// 节点值
    /// </summary>
    public object Value { get; set; }
}
 
/// <summary>
///Xml文件节点
/// </summary>
public class XmlNode
{
    public XmlNode()
    {
       
    ......

解析xml文件的几种常见的方法

xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<mobile-list>
<mobile type="Nokia2652">
<wap2>false</wap2>
<width>115</width>
</mobile>
<mobile type="Nokia2650">
<wap2>false</wap2>
<width>115</width>
</mobile>
<mobile type="Nokia6108">
<wap2>false</wap2>
<width>115</width>
</mobile>
</mobile-list>
-----------------------------------------------------
-----------------------------------------------------
使用jdom读xml文件:
package com.pk.xml;
import java.io.File;
import java.io.IOException;
import java.util.List;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
public class JDOMxml {
public static void main(String[] args) throws JDOMException, ......

使用SimpleXML函数来加载和解析XML文档

 大量SmipleXML函数可用来加载和解析大量XML文档。
1.simpleXML_load_file()函数来加载指定的XML文件到对象。如果加载文件时遇到问题,则返回FLASE。例:
book.xml文件:
<?xml version="1.0" standalone="yes"?>
<library>
<book>
<title>Pride and Prejudice</title>
<author gender="female">Jane Austen</author>
<description>Jane Austen's most popular work.</description>
</book>
<book>
<title>The Conformist</title>
<author gender="male">Alberto Moravia</author>
<description>Alberto Moravia's classic psyhcological novel.</description>
</book>
<book>
<title>The Sun Also Rises</title>
<author gender="male">Ernest Hemingway</author>
<description>The masterpiece that launched Hemingway's career.</description>
</book>
</library>
php文件:
<?php
/*=====yinyiniao=====*/
$xml=simplexml_load_file("bo ......
总记录数:815; 总页数:136; 每页6 条; 首页 上一页 [124] [125] [126] [127] 128 [129] [130] [131] [132] [133]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号