易截截图软件、单文件、免安装、纯绿色、仅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

Installshield修改XML文件

使用XML change修改xml文件的基本步骤
(仅限于Installscript MSI项目以及Basic MSI项目)
1.导入XML文件。在System Configuration试图中选择XML File Changes,右键XML
File。选择Import,可以启动Import XML
wizard。Next之后,选择需要导入的XML文件(可以在下拉框中选择类型)。Next之后,Select
ALL。如果选择部分,安装生成的文件也只有部分内容。Import 导入文件。
2.配置XML修改。
在XML Files下选择末节点(没有子节点的项),选择Advanced视图,可以看到一个选项:
Set element content。选择这个选项
然后再Cotent里面输入一个Property,例如[MY_Propery]。Property可以使用Behavior and Logic中的Property Manager添加。
3.修改内容。
通过在程序中使用MsiSetProperty(ISMSI_HANDLE,"MY_Propery",szValue)可以设置Propery的值。这样在运行安装程序之后(必须在Installing过程中才会修改XML的值),就可以看到安装的修改了。 ......

XML 字符问题

用TXT编辑了一个XML文档
<?xml version="1.0" encoding="utf-8"?>
<TEST>"
<Test Value="这是一个测试" />
</TEST>
用IE打开的时候一直显示有错误,显示汉语字符不支持。
改为encoding=“gb2312”后显示正常了。
但这个结果与初衷违背,因为UTF-8是支持所有语言的。
后来查找原因,是因为文件的存储格式存储为了ANSI.
编辑XML, 然后选择另存为 ,文件格式中选择UTF-8,存储后,就能够显示汉语了。 ......

xml读写

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml;
using FilmOnLine.Model;
namespace FilmOnLine.DAL
{
public static class FilmService
{
/// <summary>
/// 添加电影
/// </summary>
/// <param name="filmType">电影类型</param>
/// <param name="filmUrl">电影连接</param>
/// <param name="filmImages">电影图片</param>
/// <param name="filmAct">电影演员</param>
/// <returns>是否添加成功</returns>
public static bool addFilm(string filmType, string filmUrl, string filmImages, string filmAct, string mapPath)
{
try
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(mapPath);
XmlNode root = xmlDoc.SelectSingleNode("sexstore");//查找<sexstore> 跟节点
XmlE ......

spring xml中的propery 的name属性名自来源

今天在运用spring的PropertyPlaceholderConfigurer时发现一个有意思的内容,当你在applicationContext中配置一个PropertyPlaceholderConfigurer的bean时,有location和locations的属性,不明思意location对应一个.properties文件,
locations对应多个.properties文件,冲着想看一下PropertyPlaceholderConfigurer的实现机制,于是查看了spring的源码,发现在PropertyPlaceholderConfigurer中并没有location和locations的属性,于是一路向上在父类PropertiesLoaderSupport中找到了locations的属性,但是没有location属性,奇怪?但在PropertiesLoaderSupport中却有setLocation和setLocations两个方法:
/**
  * Set a location of a properties file to be loaded.
  * <p>Can point to a classic properties file or to an XML file
  * that follows JDK 1.5's properties XML format.
  */
 public void setLocation(Resource location) {
  this.locations = new Resource[] {location};
 }
 /**
  * Set locations of properties files to be loaded.
  * <p>Can point to classic prope ......

Linq xml 树加载总结(1)

  经常会用到xml文件,内容加载, 如果使用linq xml树加载,需要通过XElement类,一种方式是以字符串的形式加载,另外一种方式是以文件形式加载。         1.以字符串形式加载。           在XElement类中,通过静态的Parse()方法,将XML树以字符串的形式加载到内存中,给出了一个实现代码:       XElement element =XElement.Parse(xml);   xml是所包含的XML树内容。可以实现将该LINQ XML树加载到内存中。 2.以文件形式加载。 XElement elementfromFile = XElement.Load("myxml.xml"); XELement类中的静态Load()方法,实现将该linq xml树加载到内存中。 ......

java生成xml格式数据

//获取数据库数据返回list
public List queryAll(int fcateId) {
List list = new ArrayList();
String sql = "select * from g_Account where fCateID=? order by fCode";
Connection con = SqlHelp.getConn();//获得连接,sqlhelp自己写的工具类
PreparedStatement pst = null;
ResultSet rs = null;
try {
pst = con.prepareStatement(sql);
pst.setInt(1, fcateId);
rs = pst.executeQuery();
while (rs.next()) {
GAccount ga=new GAccount();
ga.setFCode(rs.getString("fCode"));
ga.setFName(rs.getString("fName"));
ga.setFCateID(rs.getInt("fCateID"));
ga.setFLevel(rs.getInt("fLevel"));
ga.setFParent(rs.getString("fParent"));
ga.setFIsDetail(rs.getInt("fIsDetail"));
list.add(ga);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
SqlHelp.colseConn(con, pst, rs);
}
return list;
}
//此方法是关键(获取tree结构)
public String getTree(int fcateId){
StringBuffer sb=ne ......

java生成xml格式数据

//获取数据库数据返回list
public List queryAll(int fcateId) {
List list = new ArrayList();
String sql = "select * from g_Account where fCateID=? order by fCode";
Connection con = SqlHelp.getConn();//获得连接,sqlhelp自己写的工具类
PreparedStatement pst = null;
ResultSet rs = null;
try {
pst = con.prepareStatement(sql);
pst.setInt(1, fcateId);
rs = pst.executeQuery();
while (rs.next()) {
GAccount ga=new GAccount();
ga.setFCode(rs.getString("fCode"));
ga.setFName(rs.getString("fName"));
ga.setFCateID(rs.getInt("fCateID"));
ga.setFLevel(rs.getInt("fLevel"));
ga.setFParent(rs.getString("fParent"));
ga.setFIsDetail(rs.getInt("fIsDetail"));
list.add(ga);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
SqlHelp.colseConn(con, pst, rs);
}
return list;
}
//此方法是关键(获取tree结构)
public String getTree(int fcateId){
StringBuffer sb=ne ......
总记录数:815; 总页数:136; 每页6 条; 首页 上一页 [127] [128] [129] [130] [131] [132] 133 [134] [135] [136]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号