分类目录
文章索引模板
Web Service xml - 一月 2, 2010 by yippee

DataRabbit 3.1发布,完全支持SqlServer2005/2008 – zhuweisky – 博客园
http://www.cnblogs.com/zhuweisky/archive/2008/10/23/1317981.html
w


贴几个免费实用的 Web Service服务_我的学习备忘录
http://hi.baidu.com/wjj%5Fwang/blog/item/91760a2fb8e531331e308967.html
前几天刚学习了一下调用Web Service服务,搜集几个免费的贴这里,以便于以后用的时候方便找一下!


1:IP地址来源搜索 WEB 服务(是目前最完整的IP地址数据) 获得标准数据
Endpoint: http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx


2:天气预报Web服务,数据来源于中国气象局 公用事业
Endpoint: http://www.webxml.com.cn/WebServices/WeatherWebService.asmx 
天气预报Web服务数据来源于中国气象局 http://www.cma.gov.cn/ ,每个城市天气预报数据每0.5小时左右自动更新一次,(原来为每个城市2.5小时更新,为了保证已经引用此服务的部分用户不再重新更新已编写的程序,所以 Endpoint 上的说明没有更改),数据准确可靠。包括 340 多个中国主要城市和 60 多个国外主要城市三日内的天气预报数据


3:国内飞机航班时刻表 WEB 服务 公用事业
Endpoint: http://www.webxml.com.cn/webservices/DomesticAirline.asmx 
国内飞机航班时刻表 Web Service 提供:通过出发城市和到达城市查询飞机航班、出发机场、到达机场、出发和到达时间、飞行周期、航空公司、机型等信息。


4:外汇-人民币即时报价 WEB 服务 商业和贸易
Endpoint: http://www.webxml.com.cn/WebServices/ForexRmbRateWebService.asmx 
外汇-人民币即时报价 WEB 服务, 报价数据即时更新。外汇-人民币即时报价 WEB 服务仅作为用户获取信息之目的,并不构成投资建议。支持人民币对:美元、欧元、英镑、日元、港币、加拿大元、新西兰元、新加坡元、瑞士法郎、瑞典克朗、泰国铢、挪威克朗、澳门元、澳大利亚元、丹麦克朗、菲律宾比索、清算瑞士法郎 等的兑换即时报价。


5:中国电视节目预告(电视节目表) WEB 服务 公用事业
Endpoint: http://www.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx
中国电视节目预告 Web 服务,数据准确可靠,提供全国近800个电视拼道一个星期以上的节目预告数据。一、获得支持的省市(地区)和分类电视列表;二、通过省市ID或分类电视ID获得电视台列表;三、通过电视台ID获得该电视台频道名称;四、通过频道ID获得该频道节目列表


6:腾讯QQ在线状态 WEB 服务 通讯和通信
Endpoint: http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx 
通过输入QQ号码(String)检测QQ在线状态。返回数据(String)Y = 在线;N = 离线 ;E = QQ号码错误


7:火车时刻表 WEB 服务 (第六次提速最新列车时刻表) 公用事业
Endpoint: http://www.webxml.com.cn/WebServices/TrainTimeWebService.asmx 
火车时刻表 WEB 服务提供:站站查询;车次查询;车站所有车次查询。数据来源时间:2008-04-15 第六次提速最新列车时刻表。本火车时刻表 WEB 服务提供的列车时刻表数据仅供参考,如有异议以当地铁路部门颁布为准


8:中国邮政编码 <-> 地址信息双向查询/搜索 WEB 服务 获得标准数据
Endpoint: http://www.webxml.com.cn/WebServices/ChinaZipSearchWebService.asmx 
中国邮政编码搜索 WEB 服务包含中国全部邮政编码共计187285条记录,是目前最完整的邮政编码数据,精确到乡镇级、城市精确到街道,支持邮政编码<->城市、乡镇、街道的双向查询。


php的webservice例一(已测试) – 月朗风清 – PHPChina 开源社区门户 – Powered by X-Space
http://www.phpchina.com/html/18/15818-19974.html
    * 下载nusoap类库
    * 创建webservice服务器端文件. server.php .代码如下


<?php
ini_set(“include_path”,”../”);
ini_set(“error_reporting”,”E_ALL & ~E_notice”);
require_once(“lib/nusoap.php”);


/**
 * 返回字符串
 *
 * @return string
 */
function helloworld()
{
    return  array(“name”=>”cjz”,”gender”=>”male”);
}


/**
 * 加法
 *
 * @param int $x
 * @param int $y
 * @return int
 */
function add($x,$y)
{
    return $x+$y;
}
$server = new soap_server();
$server->register(“helloworld”);
$server->register(“add”,array($x,$y));
if (phpversion()==”5.2.2″)
{
    $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents(“php://input”);
}
$server->service($GLOBALS['HTTP_RAW_POST_DATA']);


    * 客户端文件,client.php
      <?php
      require_once(“lib/nusoap.php”);
      $serviceurl = “http://localhost:8080/webservice/server.php“;
      $soapclient = new soapclient($serviceurl);


      $params = array(4,2);
      $quote1 = $soapclient->call(“helloworld”);
      echo “helloworld function: “.$quote1["name"].”–”.$quote1["gender"];
      echo “<br />”;
      $quote2 = $soapclient->call(“add”,$params);
      echo “add function:{$params[0]}+{$params[1]} = “.$quote2;



在浏览器里输入http://localhost:8080/webserver/client.php即可看到结果


PHP中使用XML-RPC构造Web Service简单入门_白桦林
http://hi.baidu.com/chi99/blog/item/7cb608cfc6ff3f39f8dc61ad.html



 

标签:
Xml转义字符 - 九月 5, 2009 by yippee

又碰到转义字符,估计这个是LINUX下JAVA生成的XML,所以只有&#xA;。

没有办法,只好整理了弄下。
if (c == ‘&’) {
buf.Append (“&amp;”);
并且XML每次还得先把&转换成&amp;。如果LOADXML,&amp;quot; 就成了:&quot;&

http://cse-mjmcl.cse.bris.ac.uk/blog/2007/02/14/1171465494443.html
In c#: xml = Regex.Replace(xml, “&\\#x(?:0[0-8BCEF]|1[0-9A-F]);”, “”);
这人狠,直接干掉··

http://www.csharper.net/blog/escape_xml_string_characters_in_c_.aspx
xml = xml.Replace( “&”, “&amp;” );
xml = xml.Replace( “&lt;”, “&lt;” );

但是好像不区分大小写?

XML文档中使用多个关键字,如果XML文档中使用这些关键字,则需要转义。这些字符如下:

l         “&”用替换“&amp”;

l         “<”用替换“&lt;”;

l         “>”用替换“&gt;”;

l         “””用替换“&quot;”;

l         空格用替换“&nbsp;”。

XML标准中还定义了其它一些转义符,用于显示一些特别字符,如各种货币的符号(英镑:&pound;)、商标符号(&#8482;)等。

Character Name  Entity Reference  Character Reference  Numeric Reference
Ampersand  &amp;  &  &#38;#38;
Left angle bracket  &lt;  <  &#38;#60;
Right angle bracket  &gt;  >  &#62;
Straight quotation mark  &quot;  ”  &#39;
Apostrophe  &apos;  ’  &#34;
http://support.microsoft.com/?scid=kb%3Ben-us%3B316063&x=7&y=9
微软直接搞了个private void ReplaceSpecialChars(long linenumber)

我干脆全部替换一遍:
string s = xn.InnerText;
s = Regex.Replace(s, “&#xD;&#xA;”, “\r\n”);
s = Regex.Replace(s, “&nbsp;”, ” “);
s = Regex.Replace(s, “&#xD;”, “\r\n”);
s = Regex.Replace(s, “&#xA;”, “\r\n”);
s = Regex.Replace(s, “&quot;”, “”");
s = Regex.Replace(s, “&lt;”, “<”);
s = Regex.Replace(s, “&gt;”, “>”);
s = Regex.Replace(s, “&apos;”, “\”);
s = Regex.Replace(s, “&amp;”, “&”);

虽然据说2、System.Text.Regex(Regular Expression正则表达式),大家都估计到它的效率不高,虽然它支持忽略大小写。
//另外还碰到个好玩的事情,如果外接了显示器,并且拖过去了程序,如果拔掉,这个程序就找不回来了。得右键菜单-移动,然后拖回来。

表显示了 XML 输出中转义的字符。除 UserData 元素(其中包含用户提供的非转义数据)外,其他所有元素和属性均发生转义。UserData 元素是调用 TraceData 方法的结果。

转义字符
& &amp;
< &lt;
> &gt;
&quot;
\ &apos;
0xD &#xD;
0xA &#xA;

找了找资料,发现很多也是手工转换:

标签:,
20090730 wordpress c# xml rpc info - 八月 18, 2009 by yippee

WordPress 2.7 XML-RPC wrapper for .Net
http://www.orbifold.net/default/?p=1721
XML-RPC.Net
http://www.xml-rpc.net/
WordPress 2.5 XML-RPC wrapper for .Net
http://www.orbifold.net/default/?p=1003
Using Wordpress XMLRPC services | PHP Made Simple
http://www.phpmadesimple.info/2009/07/05/using-wordpress-xmlrpc-services/
Weblog Client « WordPress Codex
http://codex.wordpress.org/Weblog_Client
3.4. C# XML-RPC Tutorial
http://www.wordtracker.com/docs/api/ch03s04.html
CodeProject: Coding Blog Engine with MetaWeblog API Support and Using it with Windows Live Writer. Free source code and programming help
http://www.codeproject.com/KB/XML/MetaWeblogAPI.aspx?display=Print
WP-XML-RPCLib2 – SharpLab.
http://blog.sharplab.net/computer/cprograming/wp-xml-rpclib/3015/
WP-XML-RPCLib2 – SharpLab.
http://blog.sharplab.net/computer/cprograming/wp-xml-rpclib/computer/cprograming/wp-xml-rpclib/3015/
CodeProject: Coding Blog Engine with MetaWeblog API Support and Using it with Windows Live Writer. Free source code and programming help
http://www.codeproject.com/KB/XML/MetaWeblogAPI.aspx
MetaWebLog API and Blog Writers – Rick Strahl’s Web Log
http://www.west-wind.com/WebLog/posts/23858.aspx
Windows Live Writer Beta 2 Now Available
http://www.gtrifonov.com/blog/2007/06/06/Windows_Live_Writer_Beta_2_Now_Available.aspx
Coding blog engine with MetaWeblog API support and using it with Windows Live Writer
http://www.gtrifonov.com/blog/2006/11/27/Coding_blog_engine_with_MetaWeblog_API_support_and.aspx
15 Seconds : Programming for the Palm Part 2 – The Synchronization Process
http://www.15seconds.com/Issue/030722.htm
C# blog client
http://www.aspcode.net/C-blog-client.aspx
The MetaBlog API (Creating and Editing Posts)
http://geekswithblogs.net/Tariq/archive/2009/07/05/133264.aspx
public string wp_slug;

XML-RPC Request Format
http://www.tutorialspoint.com/xml-rpc/xml_rpc_request.htm
3.4. C# XML-RPC Tutorial
http://www.wordtracker.com/docs/api/ch03s04.html

标签:, , , , ,
20090730 c# xml rpc wordpress - 八月 18, 2009 by yippee

采用 WordPress API wrapper for .Net.


在POST结构增加


 public string mt_keywords; //标签
        public string wp_slug; //URL别名


Post pp = new Post();
                pp.title = nl.name;
                pp.description = nl.txt;
                pp.dateCreated = DateTime.Parse(nl.time);
                TreeNode[] ts = treeType.Nodes.Find(nl.parent, true);
                if (ts.Length > 0)
                {
                    pp.categories = new string[] { ts[0].Text };
                    
                }
                pp.wp_slug = nl.p;
                string[] stags = nl.p.Split(‘-’);
                string strtag = “”;
                for (int i = 1; i < stags.Length;i++ )
                {
                    strtag = stags[i] + “,” + strtag;
                }
                pp.mt_keywords = strtag;



                string s = wp.NewPost(pp, true);


将别名分拆后组成TAG


然后发布,返回BLOGID号


 

标签:, , , ,
20090812 xml rpc comodo - 八月 18, 2009 by yippee

Request from client does not contain valid XML

Comodo-logo

好好的程序,突然不能发布了。报告这个错误

上网搜索下:

代码是:

public XmlRpcRequest DeserializeRequest(TextReader txtrdr, Type svcType) { if (txtrdr == null) throw new ArgumentNullException(“txtrdr”, “XmlRpcSerializer.DeserializeRequest”); XmlDocument xdoc = new XmlDocument(); xdoc.PreserveWhitespace = true; try { xdoc.Load(txtrdr); } catch (Exception ex) { throw new XmlRpcIllFormedXmlException( “Request from client does not contain valid XML.”, ex); } return DeserializeRequest(xdoc, svcType); }

搞了半天,又是抓包,又是下载WINDOWS LIVE WRITE试验

最后发现是COMODO搞鬼

我运行TOOLS死活不提示是否可以运行,是否可以联网

就那么悄然的卡掉了

而BIN目录下的也是时而正常时而不正常

即使手工加入规则也没法

最后卸载COMODO。OK。

标签:, , ,
20081020 XML Workbench Done - 六月 19, 2009 by yippee

All Done!  2008-05-04

Due to lack of interest and support, this software is no longer available.

Total Registered Users: 36

Total Downloads: > 1000 (all versions)

Total Donations: $0.00

一个可怜的人,估计还没算中国的使用清空

就被郁闷死了····

标签:
20080913 c# xml 转义 &nbsp; - 五月 11, 2009 by yippee

20080913 c# xml 转义 &nbsp;
http://www.yippeesoft.com

xslt中&nbsp;的问题 Web 开发 / XML/SOAP – CSDN社区 community.csdn.net
http://topic.csdn.net/t/20031029/17/2407536.html
用&#160;代替&nbsp;,

解析xml文件的问题…希望大家帮看看 .NET技术 / C# – CSDN社区 community.csdn.net
http://topic.csdn.net/t/20050907/19/4255830.html

为什么在xsl中无法识别&nbsp;如果在xsl中输入空格应该怎么实现? .NET技术 / ASP.NET – CSDN社区 community.csdn.net
http://topic.csdn.net/t/20051026/16/4352167.html#

使用 .NET Framework 中的 XML(DOM) – 疯一样的自由 – 博客园
http://www.cnblogs.com/caoxch/archive/2006/11/21/567250.html

How do you get Microsoft XMLDocument.Load(..) to read "&nbsp;" in the source document? : Microsoft, .Net, 2.0, Consuming XML, <b style="color:black;background-color:#a0ffff">C#</b>
http://72.14.235.104/u/loyolachicago?q=cache:IeL7lymzoGAJ:www.experts-exchange.com/Microsoft/Development/.NET/.NET_Framework_2.0/Q_23661424.html+XmlDocument.load+c%23+nbsp&hl=en&ct=clnk&cd=1

加载文档时,可以设置保留空白并在文档树中创建 XmlWhitespace 节点的选项。 若要创建空白节点,请将 PreserveWhitespace 属性设置为 true。 如果此属性设置为默认值 false,则不创建空白节点。 总是保留有效空白节点,并且总是在内存中创建 XmlSignificantWhitespace 节点以表示此数据,与 PreserveWhitespace 标志的设置无关。

如果文档从读取器加载,只有 XmlTextReader 上的 WhitespaceHandling 属性未设置为 WhitespaceHandling.None 时,XmlDocument 类上 PreserveWhitespace 标志属性的设置才会影响 XmlWhitespace 节点的创建, 读取器上 WhitespaceHandling 属性的值优先于 XmlDocument 上该标志的设置。 有关 XmlSignificantWhitespace 的更多信息,请参见 XmlSignificantWhitespace 类。

System.Xml.XmlException: Reference to undeclared entity \’nbsp\’

未处理 System.Xml.XmlException
  Message="引用了未声明的实体“nbsp”。 行 1,位置 1758。"
  Source="System.Xml"
  LineNumber=1
  LinePosition=1758
   StackTrace:
       在 System.Xml.XmlTextReaderImpl.Throw(Exception e)
       在 System.Xml.XmlTextReaderImpl.Throw(String res, String arg, Int32 lineNo, Int32 linePos)
       在 System.Xml.XmlTextReaderImpl.HandleGeneralEntityReference(String name, Boolean isInAttributeValue, Boolean pushFakeEntityIfNullResolver, Int32 entityStartLinePos)
       在 System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
       在 System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
       在 System.Xml.XmlTextReaderImpl.FinishPartialValue()
       在 System.Xml.XmlTextReaderImpl.get_Value()
       在 System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
       在 System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
       在 System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
       在 System.Xml.XmlDocument.Load(XmlReader reader)
   InnerException:

xslt中&nbsp;的问题 Web 开发 / XML/SOAP – CSDN社区 community.csdn.net
http://topic.csdn.net/t/20031029/17/2407536.html

XML Validator – Powered by Validome
http://www.validome.org/xml/validate/
Entity "nbsp" was referenced, but not declared.

欢迎进入绿色空间: XML对于"nbsp"是有问题的
http://humanyang.spaces.live.com/Blog/cns!7D62EB59D964BDCA!114.entry
org.dom4j.DocumentException: Error on line 2 of document  : The entity "nbsp" wa

s referenced, but not declared. Nested exception: The entity "nbsp" was referenc

ed, but not declared.

Description of the Forms Server 2007 hotfix package: May 21, 2007
http://support.microsoft.com/?scid=kb%3Ben-us%3B937497&x=10&y=11

Canonical XML
http://www.w3.org/1999/07/WD-xml-c14n-19990729.html

Encoder.cs ASP.NET Open Source C# Content Management System (CMS)
http://www.vwd-cms.com/open-source/source-code-viewer.aspx?file=v021%2FVwdCms.Admin%2FEncoder.cs.exclude

StateMachine in c# and xml – Ramon Smits
http://bloggingabout.net/blogs/ramon/archive/2005/09/28/9544.aspx

A sample of operating XML document in ASP.NET 2.0(C#)
http://www.aspnettutorials.com/tutorials/database/XML-Csharp.aspx

xsl里想有&nbsp;(HTML里的空格)怎么办?显示内容里有>怎样转义谢谢! Web 开发 / XML/SOAP – CSDN社区 community.csdn.net
http://topic.csdn.net/t/20030508/00/1753289.html

HTML/XML 中的转义字符_待定
http://hi.baidu.com/goglad/blog/item/69d83c9bd6a01ab1c8eaf4e8.html

[转] C#下 读取xml节点的数据总结 – 爱晚红枫技术部广东分部 – 博客园
http://www.cnblogs.com/xiang/archive/2006/03/13/349303.aspx

怎样在XmlDocument类生成的XML文档中包含不被转义的字符-软件开发-软界知道-中国软界项目交易网
http://www.softwelt.com/Know/KnowDetail-1823047.html

Trying to write &#xD; into XML document
http://www.velocityreviews.com/forums/t133488-trying-to-write-ampxd-into-xml-document.html

.NET and XML — Processing XML with .NET — Chapter 5. Manipulating XML with DOM — The .NET DOM Implementation
http://www.uupx.com/VisualStudio2005/XMLPractices/20070802071612_2.html

王有礼教授编著
http://cache.baidu.com/c?m=9f65cb4a8c8507ed4fece763104397355b0e97634b8691027fa3cf0ed4251d564711b4ed603510739580613440ed5e5c9dac61342a557df2c796d5198ba6e3727cca6163300b864612d11aa9dc4652a342f64eacf259b1b5ba6dcdeb88889903128800542d97f0fa105f4a9c32a1536eb4fadf&p=8970c64ad79111a05afed5125c&user=baidu#baidusnap0

C#发现之旅第一讲 C#-XML开发(6) – 技术应用 – 豆豆网
http://tech.ddvip.com/2008-05/121201323244777_6.html

.Net中多语言版本的实现 [vs2003](抄袭)_英雄回首向天涯
http://hi.baidu.com/dl82359509/blog/item/60e0782d98779b30359bf77f.html

使用 .NET Framework 中的 XML(DOM) – 疯一样的自由 – 博客园
http://www.cnblogs.com/caoxch/archive/2006/11/21/567250.html

XML转义符和空白字符-asp教程-asp学习网
http://www.aspxuexi.com/topics/xml/2007-11-13/2953.htm
空格 (&#x0020;)
Tab (&#x0009;)
回车 (&#x000D;)
换行 (&#x000A;)

html编辑器的回车换行问题解决方案,XML专区,徐州邳州网站建设,网页设计,徐州邳州网站制作,网络公司,徐州慧网网络科技有限公司
http://www.huinet.cn/news_type.asp?id=2748

标签:, ,
20080815 c# wpf layout xml - 四月 9, 2009 by yippee

20080815 c# wpf layout xml
http://www.yippeesoft.com

一步一步学Silverlight 2系列(3):界面布局_精髓精辟精干精练
http://hi.baidu.com/myselfdone/blog/item/96e28d1c6d12798f87d6b62b.html

WordML 2003示例_HenryChan
http://hi.baidu.com/pepsichan/blog/item/35f9691f19c2a20c314e1543.html

XinQing – 博客园
http://www.cnblogs.com/xinqing/

WPF SDK研究 之 Layout布局-芝麻网
http://www.zhimax.com/html/wpf/2008716/0871691149678.htm

一步一步学Silverlight 2系列(3):界面布局_精髓精辟精干精练
http://hi.baidu.com/myselfdone/blog/item/96e28d1c6d12798f87d6b62b.html

C#反射技术之一读取和设置类的属性_luchaoshuai dai8.net
http://hi.baidu.com/luchaoshuai/blog/item/6c43ed8665596d3a67096eba.html

C# 中“自定义属性” 功能和 反射的使用 例子_widebright的个人空间
http://hi.baidu.com/widebright/blog/item/7a0f369b7795ccb0c9eaf48b.html

使用反射访问属性(C# 编程指南)_HankxCMS-海讯工作室,专注CMS开发
http://hi.baidu.com/hankx/blog/item/1d1e372a507ece3b5343c111.html

[原创]中国式皇帝庙号谥号列表(中+朝+越+日) – 历史回声 – 春秋中文社区 军事 春秋 历史 社区 论坛 – 春秋军事
http://bbs.cqzg.cn/viewthread.php?tid=384036
太祖承天广运圣德神功肇纪立极仁孝睿武端毅钦安弘文定业高皇帝 讳努尔哈赤
太宗应天兴国弘德彰武宽温仁圣睿孝敬敏昭定隆道显功文皇帝 讳皇太极
成宗懋德修道广业定功安民立政诚敬义皇帝 讳多尔衮(追封)
世祖体天隆运定统建极英睿钦文显武大德弘功至仁纯孝章皇帝 讳福临
圣祖合天弘运文武睿哲恭简宽裕孝敬诚信功德大成仁皇帝 讳玄烨
世宗敬天昌运建中表正文武英明宽仁信毅睿圣大孝至诚宪皇帝 讳胤禛
高宗法天隆运至诚先觉体元立极敷文奋武钦明孝慈神圣纯皇帝 讳弘历春秋网http://bbs.cqzg.cn
仁宗受天兴运敷化绥猷崇文经武孝恭勤俭端敏英哲睿皇帝 讳颙琰
宣宗效天符运立中体正至文圣武智勇仁慈俭勤孝敏宽定成皇帝 旻宁
文宗协天翔运执中垂谟懋德振武圣孝渊恭端仁宽敏显皇帝 讳奕詝
穆宗继天开运受中居正保大定功圣智诚孝信敏恭宽毅皇帝 讳载淳
德宗同天崇运大中至正经文纬武仁孝睿智端俭宽勤景皇帝 讳载湉
宪宗配天同运法古绍统粹文敬孚宽睿正穆体仁立孝襄皇帝 讳溥仪

票友的由来 相声公社 北京德云社 – powered by phpwind.net
http://www.guodegang.org/old_bbs/read.php?tid=42420
票友,出现于清朝,与满族人有一定的关系。《红毹纪梦诗注》(张伯驹著)中说,票友“其始于乾隆征大小金川时,戍军多满洲人。万里征戍,自当有思乡之心,乃命八旗子弟从军歌唱曲艺,以慰军心。每人发给执照,执照即称为票。后凡非伶人演戏者,不论昆乱曲艺,即沿称票友矣。”就是说票友是在乾隆时才有的,最初不过是满洲八旗子弟在军中所为,后来才传到民间。
  清代票友中不乏满族人,甚至包括一些王公贵族。清朝嘉道年间的贝勒奕綺,同光朝的贝勒载澄都是当时的名票。辛亥革命后,满族人受到歧视,昔日的票友中有不少人为了生计,不得不下海谋生,而其中有的日后成为了名角。

通过反射设置窗口属性 (自动化测试UI) – 带你去月球 – 博客园
http://www.cnblogs.com/freewl/archive/2008/03/19/1113581.html

C#反射技术之一读取和设置类的属性_luchaoshuai dai8.net
http://hi.baidu.com/luchaoshuai/blog/item/6c43ed8665596d3a67096eba.html

PropertyAttributes 枚举 (System.Reflection)
http://msdn.microsoft.com/zh-cn/library/system.reflection.propertyattributes(VS.80).aspx

C#反射属性例子_wufeng
http://hi.baidu.com/wufeng_0712/blog/item/e58cb96052d35cd98cb10d5b.html

用反射发出定义属性
http://msdn.microsoft.com/zh-cn/library/h1zby21a(VS.80).aspx

一步一步学Silverlight 2系列(3):界面布局_精髓精辟精干精练
http://hi.baidu.com/myselfdone/blog/item/96e28d1c6d12798f87d6b62b.html

WPF SDK研究 之 Layout布局-芝麻网
http://www.zhimax.com/html/wpf/2008716/0871691149678.htm

演练:在 Windows Presentation Foundation 中排列 Windows 窗体控件
http://msdn.microsoft.com/zh-cn/library/ms752027.aspx

WPF笔记(2.5 Canvas)——Layout – 包建强的开源地带 – 博客园
http://www.cnblogs.com/jax/archive/2007/04/01/695827.html

Need Help Parsing XML File with VBA??? : Microsoft, Office, Visual Basic, VBA, Access
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_23524370.html

CodeProject: DotLucene Indexer. Free source code and programming help
http://www.codeproject.com/KB/cs/DotLucene_Indexer.aspx

wow-tristan – Google Code
http://code.google.com/p/wow-tristan/source/browse/trunk/LunarStorm.gadget/gadget.htm?r=252

C#反射实例讲解 – 梦幻Dot Net – 博客园
http://www.cnblogs.com/fineboy/archive/2007/08/31/525348.html#877166

C#反射实例讲解 – 梦幻Dot Net – 博客园
http://www.cnblogs.com/fineboy/archive/2007/08/31/525348.html#877166

VS提示“非静态的字段、方法或属性要求对象引用”是什么意思?_百度知道
http://zhidao.baidu.com/question/26032177.html

不能用非静态字段进行静态引用_百度知道
http://zhidao.baidu.com/question/46755409.html

Re: XmlNode.SelectSingleNode() Question
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.languages.csharp/2007-01/msg04515.html

WordML 2003示例_HenryChan
http://hi.baidu.com/pepsichan/blog/item/35f9691f19c2a20c314e1543.html

标签:, ,
20080717 XmlSerializer Deserialize 资料 - 三月 1, 2009 by yippee

20080717 XmlSerializer Deserialize 资料
http://www.yippeesoft.com

http://www.csharper.net/blog/serializing_without_the_namespace__xmlns__xmlns_xsd__xmlns_xsi_.aspx
Serializing without the namespace (xmlns, xmlns:xsd, xmlns:xsi)
http://www.csharper.net/blog/serializing_without_the_namespace__xmlns__xmlns_xsd__xmlns_xsi_.aspx

http://hi.baidu.com/zhou_boke520/blog/item/7c41edd5357b3dc151da4bb5.html
类的序列化

http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=752635&SiteID=1
Remove escape sequence in XML string to deserialize 

http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.xml/2007-01/msg00145.html
Re: Deserialize Attribute with a Namespace

http://bytes.com/forum/thread177837.html
XmlSerializer does not deserialize elements /w specified namespace?

http://forums.msdn.microsoft.com/pt-BR/asmxandxml/thread/1aacdcb2-3b2b-4a4f-8bc4-b8789f0b8ebc/
Deserialize SOAP with namespace prefixes

http://blog.csdn.net/huigll/archive/2007/03/02/1519687.aspx
 调用 XmlSerializer.Deserialize 注意:会一直增加程序集

http://www.cnblogs.com/zwl12549/archive/2007/12/25/1014313.html
XmlSerializer.Deserialize 方法 (XmlReader)的C#例子

http://www.codeproject.com/KB/XML/Serialization_Samples.aspx
.NET XML and SOAP Serialization Samples, Tips

http://bytes.com/forum/thread177887.html
Serializing a class and not get the "?xml version"

http://bytes.com/forum/thread172368.html
Serialization – Removing Any Attributes in the root.

https://groups.google.com/group/microsoft.public.dotnet.xml/browse_thread/thread/b54e20e9fc9e0214
 XML Serialization – Remove XML-instance namespace?

 http://www.codeproject.com/KB/XML/xml_serialization_de.aspx?display=Print
 XML Serialization and deSerialization

 http://www.developersdex.com/csharp/message.asp?p=1111&ID=%3CXns9A6414E1C8125usenethoneypotrogers%40127.0.0.1%3E
 XML Serialization – Remove XML-instance namespace?

 http://forums.msdn.microsoft.com/en/asmxandxml/thread/77aa3fb0-6b8a-4dc4-9308-0dcd5184c287/
 Remove namespace from ASP.NET web service, or add namespace prefix?
RSS

http://msdn.microsoft.com/zh-cn/58a18dwa(VS.80).aspx
XML 序列化的示例

http://blog.sina.com.cn/s/blog_44e90a13010009zr.html
反射实现泛型集合与XML的序列化反序列化

 http://bytes.com/forum/thread427757.html
 Soap Faults

 http://www.codeproject.com/KB/XML/Serialization_Samples.aspx
 .NET XML and SOAP Serialization Samples, Tips

 https://groups.google.com/group/microsoft.public.dotnet.xml/browse_thread/thread/9195d8f5a339ce89/9a619c313a02bf5c?fwc=1
 
Error DeSerializing XML document – xmlns=\’\'> was not expected
Options
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
Standard view   View as tree
Proportional text   Fixed font
 
 
http://www.cnblogs.com/lexus/archive/2007/11/19/964833.html
WebSharp Aspect改进(续2)

http://blog.csdn.net/tyg_owen/archive/2005/06/05/388377.aspx
 序列化反序列化对象XML文件写入Sample,简单但是有代表性

 http://msdn.microsoft.com/zh-cn/ms731073.aspx
 序列化和反序列化

 http://www.cnblogs.com/savageworld/archive/2007/04/26/728679.html
 【转】.NET Framework轻松处理XML数据(五)

 http://www.cnblogs.com/symbol441/archive/2008/04/15/1154789.html
 ASP.NET 2.0中XML数据的处理

 http://www.codeproject.com/KB/cpp/XmlHelper.aspx
 XML for beginners and experts

标签:, , , ,

20080717 XmlSerializer Deserialize xml - 二月 28, 2009 by yippee

20080717 XmlSerializer Deserialize xml
http://www.yippeesoft.com

~~类序列化
ftp p = new ftp();
            //串行化对象
            System.Xml.Serialization.XmlSerializer xmlSer = new XmlSerializer(p.GetType());

            p.ip = "124";
            p.port = "sdf";
            XmlSerializerNamespaces namespaceSerializer = new XmlSerializerNamespaces();
            namespaceSerializer.Add("", ""); //REMOVE mlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://mycompany.com/"
            using (StringWriter sw = new StringWriter())
            &leftsign;
                XmlWriterSettings settings = new XmlWriterSettings();
                //settings.OmitXmlDeclaration = true; // Remove the <?xml version="1.0" encoding="utf-8"?>

                XmlWriter xtw = XmlWriter.Create(sw, settings);
                //XmlTextWriter xtw = new XmlTextWriter(sw,);
                xmlSer.Serialize(xtw, p, namespaceSerializer);
                System.Diagnostics.Trace.WriteLine(sw.ToString());
                sw.Close();

~~类反序列化
  string xmlMarkup = @"<ftp ip=""124"" port=""sdf"" />";

            XmlSerializer xmlSerializer = new XmlSerializer(typeof(ftp));

            ftp usenetGoddy = (ftp)xmlSerializer.Deserialize(new StringReader(xmlMarkup));

            Console.WriteLine("Created &leftsign;0&rightsign;, Name: &leftsign;1&rightsign;", usenetGoddy, usenetGoddy.ip);
~
//生成xml字符串:
            using (StringWriter sw = new StringWriter())
            &leftsign;
                XmlTextWriter xtw = new XmlTextWriter(sw);
                xtw.Formatting = Formatting.Indented;
                //xtw.WriteStartDocument(); //去掉XML头信息

                xtw.WriteStartElement("sysinfo");

                //test
                xtw.WriteStartElement("ftp");
                xtw.WriteAttributeString("ip", "wwqr");
                xtw.WriteAttributeString("port", "123");
                xtw.WriteEndElement();

                        string result = sw.ToString();

                System.Diagnostics.Trace.WriteLine(result);
~~取信息
XmlTextReader tr = new XmlTextReader(@"<login value=""fail"" errorcode=""xxx""/>",XmlNodeType.Element, null);
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(tr);
            tr.Close();
            XmlNode xm = xmlDoc.SelectSingleNode("login");
            System.Diagnostics.Trace.WriteLine(xm.Attributes["value"].Value.ToString());

     ““““““““`
 

标签:, , ,
20080715 c# xml 1 - 二月 27, 2009 by yippee

20080715 c# xml 1
http://www.yippeesoft.com

Writing XML in .NET Using XmlTextWriter
http://www.developer.com/net/net/article.php/1482531
XML is a hot topic. A primary reason for it being of interest is the fact that it is simple to understand and simple to use. Any programmer should be able to easily look at an XML file and understand its contents.

.NET contains a number of classes that support XML. Many of these classes make working with XML as easy as understanding XML. I\’m going to show you an example of one such class here. This is the XmlTextWriter class.

http://bytes.com/forum/thread561266.html
How to create this with XmlTextWriter

http://www.chinamacro.com/blog/visit_detail.aspx?blogID=44
如何用ASP.Net从数据库读取数据生成并发送XML数据(不生成XML文件)?

http://hi.baidu.com/irinihp/blog/item/c10752dd21fb6bdc8d102981.html
C#创建XML字符串

http://blog.csdn.net/kybd2006/archive/2007/08/07/1729562.aspx
 使用XmlTextWriter生成XML文件

 XmlTextWriter   xtw=new   XmlTextWriter(filename,System.Text.Encoding.GetEncoding("GB2312"));

 http://tech.ccidnet.com/art/1110/20050209/857855_1.html
 XmlTextWriter创建XML文件

 http://msdn.microsoft.com/zh-cn/library/wkee9k2s.aspx
 使用 XmlTextWriter 创建格式正确的 XML

XmlDocument xmldoc = new XmlDocument();
        XmlNode xRoot = xmldoc.CreateNode(XmlNodeType.Element, "root", "");
        xmldoc.AppendChild(xRoot);

        MemoryStream ms = new MemoryStream();
        XmlTextWriter tw = new XmlTextWriter(ms, Encoding.Unicode);
        tw.Formatting = Formatting.Indented;
        tw.Indentation = 4;
        xmldoc.Save(tw);

        byte[] ary = ms.ToArray();
        string s = Encoding.Unicode.GetString(ary);
//        Response.Write(s);  //输出看是正常的
        xmldoc.LoadXml(s);

http://dev.csdn.net/article/21/21432.shtm
使用XmlTextWriter对象创建XML文件

using   System;  
  using   System.IO;  
  using   System.Xml;  
   
  public   class   Sample  
  &leftsign;  
      public   static   void   Main()  
      &leftsign;  
          //   Create   the   XmlDocument.  
          XmlDocument   doc   =   new   XmlDocument();  
          doc.LoadXml("<book   genre=\’novel\’   ISBN=\’1-861001-57-5\’>"   +  
                                  "<title>Pride   And   Prejudice</title>"   +  
                                  "</book>");  
   
          //   Save   the   document   to   a   file.  
          doc.Save("data.xml");  
      &rightsign;  
  &rightsign;  

http://dev.rdxx.com/NET/SOAP/2005-7/27/120705632_9.shtml
C#中使用XML——编写XML

http://dev.csdn.net/article/64/64234.shtm
C#中使用XML——编写XML     

http://www.hackhome.com/InfoView/Article_180135.html
在Visual C#中使用XML之编写XML

http://developer.yahoo.com/dotnet/howto-xml_cs.html
Using Returned XML with C# – Yahoo! Developer Network

http://www.enet.com.cn/article/2004/0809/A20040809331749_2.shtml
Visual C#的Web XML编程

http://www.pcvz.com/Program/Programs/CCC/CCCnetprogram/Program_56400_10.html
在Visual C#里面运用XML指南之读取XML

读取节点中的值    
  XmlDocument   doc=new   XmlDocument();    
  doc.Load("config.xml");    
  XmlNode   xnserver   =   doc.SelectSingleNode("userdata/dataconnection/server");    

http://www.cnblogs.com/xiaopeng84/archive/2007/11/30/978271.html
C#利用XmlTextReader读取XML节点数据

http://blog.csdn.net/jackeyabc/archive/2007/11/01/1860702.aspx
 使用 XmlTextReader类

 http://topic.csdn.net/t/20040925/10/3407705.html
 读取XM文件中的信息!

 http://topic.csdn.net/u/20071114/14/ed88c486-3458-4e89-8437-1eaad574b8c3.html?553233395
 C#.net 用XmlTextReader和XmlDocument来读Xml文档

 http://support.microsoft.com/kb/301228/zh-cn
 HOW TO:在 .NET 框架 SDK 中读取数据流的 XML 数据

http://tech.sina.com.cn/s/s/2007-05-09/10471498264.shtml
实例:用Visual C#制作新闻阅读器

http://blog.sina.com.cn/s/blog_4bf6934f010007xy.html
在TreeView上进行Node定位(C#)

http://www.nohack.cn/code/net/2006-10-06/21783.html
C#中使用XML——实现DOM
本篇文章来源于 黑客手册
原文链接:http://www.nohack.cn/code/net/2006-10-06/21783.html

http://hi.baidu.com/jmh_521/blog/item/e3cd5a51cbd22e1d377abecc.html
C#中的XML

http://www.codeproject.com/KB/cpp/XmlHelper.aspx
XML for beginners and experts
By rudy.net

http://www.cnblogs.com/maxun/articles/323105.html
C#中XML的初步使用

http://dev.csdn.net/author/kingjiang/cd9a3c8136214b0a82b078ce16be3b25.html
C#中处理XML文档的方法

http://dev.rdxx.com/NET/CSharp/2002-1/27/005629624.shtml
C#读取XML文档

http://www.yesky.com/155/1915155_1.shtml
在Visual C#中使用XML指南之读取XML

http://www.codeproject.com/KB/XML/csharpcodedocumentation.aspx
C# and XML Source Code Documentation

http://www.codeproject.com/KB/XML/xml_serializationasp.aspx
Load and save objects to XML using serialization

http://hi.baidu.com/mytips/blog/item/2e412a0198b7340a7aec2c51.html

http://www.cnblogs.com/kevinton/archive/2007/06/27/797354.aspx
C#读写XML文件

http://www.codeproject.com/KB/cs/XML.aspx
XML for Beginners

标签:,

20080306 c# substring xmlrpc - 十二月 3, 2008 by yippee

20080306 c# substring xmlrpc
http://www.yippeesoft.com

如以下这段代码:

string   first=”纪念12″;
string   second=first.Substring(0,2);
string   third=first.Substring(1,2);
string   fourth=first.Substring(2,2);

程序运行后   second=”纪念”   ,   third=”念6″   ,   fourth=”6/”
而不是我原来预想的   second=”纪”   ,   third=”*乱码*”   ,   fourth=”念”

开发中经常遇到,字符串过长,无法完全显示的问题

string   first=”纪念6/4″;
byte[]   bytes   =   System.Text.Encoding.Default.GetBytes(first);
MessageBox.Show(System.Text.Encoding.Default.GetString(bytes,0,2));
MessageBox.Show(System.Text.Encoding.Default.GetString(bytes,1,2));
MessageBox.Show(System.Text.Encoding.Default.GetString(bytes,2,2));

这时候就需要截取我们所需要的长度,后面显示省略号或其他字符。

由于中文字符占两个字节,而英文字符占用一个字节,所以,单纯地判断字符数,效果往往不尽如人意

下面的方法通过判断字符的类型来进行截取,效果还算可以:)

如果大家有其他的解决方法欢迎贴出来,共同学习:)
**********************************************************************
private String str;
private int counterOfDoubleByte;
private byte b[];
/**
* 设置需要被限制长度的字符串
* @param str 需要被限制长度的字符串
*/
public void setLimitLengthString(String str)&leftsign;
this.str = str;
&rightsign;
/**
* @param len 需要显示的长度(<font color=”red”>注意:长度是以byte为单位的,一个汉字是2个byte</font>)
* @param symbol 用于表示省略的信息的字符,如“…”,“>>>”等。
* @return 返回处理后的字符串
*/
public String getLimitLengthString(int len, String symbol) throws UnsupportedEncodingException &leftsign;
counterOfDoubleByte = 0;
b = str.getBytes(“GBK”);
if(b.length <= len)
return str;
for(int i = 0; i < len; i++)&leftsign;
if(b[i] < 0)
counterOfDoubleByte++;
&rightsign;

if(counterOfDoubleByte % 2 == 0)
return new String(b, 0, len, “GBK”) + symbol;
else
return new String(b, 0, len – 1, “GBK”) + symbol;
&rightsign;

Sample   code   as   follows:
string   ss=”asdfafadfadfalskdhoweifaklsenfoweicakmsndva;woeifhakjlsdnvalkwfihfh”;
byte[]   bData   =   Encoding.Unicode.GetBytes(   ss   );
Stream   ss2   =   new   MemoryStream(   bData,   true   );
ss2.Read(   bData,   0,   bData.Length   );

1)SOAP

SOAP,全名是Simple Object Access Protocol,是Microsoft提交给W3C的Web Service协议。我觉得SOAP的两个最大的好处是:

* 协议的可扩展性(Extension Mechanism)
* 良好的工具支持

SOAP的消息称为一个SOAP Envelope,包括SOAP Header和SOAP BODY。其中,SOAP Header可以方便的插入各种其它消息来扩充Web Service的功能,比如Security(采用证书访问Web Service),SOAP BODY则是具体的消息正文,也就是Marshall后的信息。

SOAP调用的时候,也就是向一个URL(比如http://ws.invesbot.com/stockquotes.asmx?WSDL)发送HTTP Post报文,调用方法的名字在HTTP Request Header SOAP-Action中给出,接下来就是SOAP Envelope了。

服务端接到请求,执行计算,将返回结果Marshall成XML,用HTTP返回给客户端。

SOAP的工具支持非常好,比如在.NET里,可以用WSDL.exe非常方便的为一个Web Service生成本地Proxy(Proxy模式),这样,你的程序就像调用本地API一样了,而由Framework为你完成Marshall和传送的工作。

2)XMLRPC

XMLRPC ,我记着看过一段Don Box的采访,他说当时Microsoft费了7年的时间(大概,记不清楚了)才成功的把SOAP提交给W3C,而Dave Winer(眼熟吧,RSS’s Father)借鉴SOAP实现了一个更轻量级的协议,那就是XMLRPC。以前曾经大概看过XMLRPC,XMLRPC就是SOAP的简化和改进,比如说:

* Marshall类型的支持有限
* 取消HTTP Header中的SOAP Action,而将Method Name也放到XMLRPC的Body中
* 传送的XML信息中没有Header,只有Body。

XMLRPC相比于SOAP最大的优势就是它的简单,弱点就是扩展性弱,另外,工具支持也不如SOAP那般正规,感觉起来,一个像正规军,一个像游击队。不过,游击队才有作战灵活的特点

标签:, , ,
20071114 xml xlst WML c# 资料 - 八月 23, 2008 by yippee

20071114 xml xlst WML c# 资料
http://www.yippeesoft.com

private void Button1_Click(object sender, System.EventArgs e)
  &leftsign;
   //创建新的xml
   XmlDocument doc = new XmlDocument();
   doc.LoadXml("<company></company>");
   //设置版本信息
   XmlDeclaration xmldecl;
   xmldecl = doc.CreateXmlDeclaration("1.0",null,null);
   xmldecl.Encoding="gb2312";
   //xmldecl.Standalone="yes";  

   //
   XmlElement root = doc.DocumentElement;
   doc.InsertBefore(xmldecl, root); 
   //设置根结点
   XmlElement newCompany = doc.DocumentElement;
   //创建新的name
   XmlElement newName = doc.CreateElement("name");
   newName.InnerText = "公司名称"; //公司名称
   //加入父结点
   newCompany.AppendChild(newName);
          
   XmlElement newInfo = doc.CreateElement("info");
   newInfo.InnerText = "简介"; //简介
   newCompany.AppendChild(newInfo);

   &rightsign;
   //&rightsign;

   //doc.DocumentElement.AppendChild(newCompany);

   XmlTextWriter tr = new XmlTextWriter(Server.MapPath(Random_str()),System.Text.Encoding.GetEncoding("gb2312"));
   doc.WriteContentTo(tr);
   tr.Close();
  &rightsign;

C#生成Xml字符串
分类:其他
 1  public string PrintString()
 2        &leftsign;
 3            using (StringWriter sw = new StringWriter())
 4            &leftsign;
 5                XmlTextWriter xtw = new XmlTextWriter(sw);
 6
 7                #region WebPage
 8                xtw.WriteStartElement("WebPage");
 9                xtw.WriteAttributeString("ID", "123");
10                xtw.WriteAttributeString("Url", "http://www.cnblogs.com/");
11                xtw.WriteEndElement();
12                #endregion
13
14                return sw.ToString();
15            &rightsign;
16        &rightsign;

使用XML读写删除功能来实现资源文件配置
http://www.cnblogs.com/cheatlove/articles/405380.html

把HTML表单提交的数据转化成XML文件
http://blog.csdn.net/net_lover/archive/2001/02/16/6834.aspx

Visual studio 2005下xml的xsl转换调试
http://www.xyhhxx.com/display.aspx?subID=3962

http://murali-net.spaces.live.com/blog/cns!BA941134539258D2!240.entry
XslCompiledTransform

The XslTransform? class was used in the .Net framework 1.x for XSLT transformation. In the .Net framework 2.0, the XsltCompildTransform class is the new XSLT processor. It is such an improvement that XslTransform is deprecated and mark with the Obsolute attribute. The compiler will now advice you to use XslCompiledTransform. The system generates MSIL code on the call to compile() and the XSLT executes many times faster than previous techniques. You can also hold a reference to an XsltCommand and speed processing even faster. This compilation technique also includes full debugging support from with in Visual Studio.

Response.ContentType = “text/xml”;

String xsltFile = Path.Combine(Request.PhysicalApplicationPath,”books.xslt”);

String xmlFile = Path.Combine(Request.PhysicalApplicationPath,”books.xml”);

XslCompiledTransform xslt = new XslCompiledTransform();

Xslt.Load(xsltFile);

XPathDocument doc = new XPathDocument(xmlFile);

xslt.Transform(doc, new XmlTextWriter( Response.Outpur));

    The c# code handling the transformation is below:
using System;
using System.Xml;
using System.Xml.Xsl;
using System.Xml.XPath;
using System.Text;
using System.IO;

this.Response.ContentType = "text/html";
//retrieve the xml document object from the model
XmlDocument doc = BoxImpl.BoxXml(this._templateId, this._type, this._boxId, this._op);
//in .NET framework 2.0, it is recommended that use the XslCompiledTransform instead of XslTransform
XslCompiledTransform transform = new XslCompiledTransform();
transform.Load(this.Server.MapPath("cc.xsl"));
MemoryStream stream = new MemoryStream();
transform.Transform(doc.CreateNavigator(), null, stream);
//maybe the Position was moved to the end of the MemoryStream while transforming,
//so it\’s necessary to set this attribute to 0 before reading the stream
stream.Position = 0;
//the encoding attribute specified in the xsl:output node is utf-8,
//so here we read the output stream using the System.Text.Encoding.UTF8 correspondingly
StreamReader reader = new StreamReader(stream, System.Text.Encoding.UTF8);
this.Response.Write(reader.ReadToEnd());
reader.Close();
stream.Close();

http://www.cnblogs.com/riccc/archive/2007/06/19/789619.html

从 XslTransform 类迁移

http://blog.hdut.com/blog_show.aspx?sort=1&id=20

XmlDocument的应用—创建Xml模板
http://www.cnblogs.com/RuiLei/archive/2007/02/11/647303.aspx

将 XML 文档读入 DOM
http://msdn2.microsoft.com/zh-cn/library/azsy1tw2(VS.80).aspx

C#操作XML简要教程
http://blog.csdn.net/wjsun/archive/2007/10/25/1842993.aspx

XMLTextReader和XmlDocument读取XML文件的比较
http://www.cnblogs.com/goody9807/archive/2006/10/24/534888.html

XML和XSL来生成动态页面
http://www.xindaima.cn/new/h/187/

动态生成XML文档的几种方式
http://www.ybj86.cn/dede/html/jiaobenkaifa/XML/20070728/1965.html

C# 处理XML + XSLT转换中HTML元素的输出问题及解决
http://www.cnblogs.com/zhumi/archive/2004/11/25/68599.html

http://lists.xml.org/archives/xml-dev/200012/msg00055.html
 XML to WML translation

 Differences between HTML and WML
 http://www.webreference.com/xml/column16/2.html

 改进 XSLT 编码的五种方法
 http://www.ibm.com/developerworks/cn/xml/x-xslt5/

 Implementing the factory pattern using attributes and activation
 http://www.codeproject.com/cs/design/factorywithattributes.asp

 http://www.cnblogs.com/yesun/archive/2006/09/13/503402.html
 解决不支持cookie的手机访问wap(session)

 CodeProject – 使用特性(attributes)和激活机制来实现工厂模式
 http://www.cnblogs.com/wdxinren/archive/2004/11/25/68775.html

  在.net中生成wml
vs新建项目时选移动web应用程序,然后在web.config的</system.web>前面加上
<browserCaps>
<result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<use var="HTTP_USER_AGENT" />
preferredRenderingType = "wml11"
preferredRenderingMime = "text/vnd.wap.wml"
preferredImageMime = "image/vnd.wap.wbmp"
</browserCaps>

XML 之 wml 1.1
http://www.cnblogs.com/menghe/articles/83598.html

WML的事件
http://www.cnblogs.com/kikee/archive/2005/05/14/155192.html

汇总WML标签:
http://www.cnblogs.com/frankboy/archive/2006/04/01/364133.html

The Story of a WML Generator
http://www.developer.com/tech/article.php/10923_3549736_3

十分钟内学会:将HTML格式化为合法的XML
http://www.cnblogs.com/cathsfz/archive/2007/02/07/643336.html

使用SgmlReader将HTML转换为合法的XML
http://www.cnblogs.com/cathsfz/articles/642267.html

重构之美-走在Web标准化设计的路上[对HTML/XHTML/XML/XSL的一些认识]

XSLT转换XML小结
http://www.cnblogs.com/RicCC/archive/2006/12/20/598619.html

asp.net(C#)海量数据表高效率分页算法(易懂,不使用存储过程)
http://www.3qblog.com/oblog312/user1/e_wsq/archives/2007/5392.html

xml+asp+xsl实现wap和html页面输出
http://blog.const.net.cn/item/b929d097bd3e8ef3.htm

国立东华大学资讯工程研究所
硕士论文
支援通用存取之使用者意向聚焦与
资源感知语意转形

XML——连接SQL和Web程序的桥梁

Works.LT平台技术参考(草)
—工作描述语言规范说明Works Model Language Specification-WML v0.99.3

1.  XSL包括三个部分:
a) xslt: 用户转换XML的语言
b) xpath: 定义XML的部分的语言
c) xsl-fo: 用户格式化XML语言的语言

XML to WML translation
http://www.stylusstudio.com/xmldev/200012/post50050.html

Transforming XML into WML
http://www.wirelessdevnet.com/channels/wap/training/xslt_wml.html

WAP中图像列表的设计
http://www.cnblogs.com/freemobile/archive/2006/11/28/575062.aspx

标签:, , , ,

20071114 xml xlst WML c# 动态 - 八月 22, 2008 by yippee

20071114 xml xlst WML c# 动态
http://www.yippeesoft.com

xlst~~~~~
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml"
   indent="yes"
   media-type="text/vnd.wap.xml"
   omit-xml-declaration="no"
   doctype-public="-//WAPFORUM//DTD WML 1.1//EN"
   doctype-system="http://www.wapforum.com/DTD/wml_1.1.xml"
/>
  <xsl:template match="/">
    <wml>
      <card id="main1" title="main card">
        <onevent type="ontimer">
          <go href="http://localhost:8080/jsp/mainmenu.jsp"/>
        </onevent>
        <timer value="60"/>
        <do type="accept" label="next">
          <go href="http://localhost:8080/jsp/mainmenu.jsp"/>
        </do>
        <do type="prev">
          <noop/>
        </do>
        <p>
          Welcome <xsl:value-of select="/name/first"/>
          <xsl:text> </xsl:text>
          <xsl:value-of select="/name/last"/> to AirBank!
        </p>
      </card>
    </wml>
  </xsl:template>
</xsl:stylesheet>

~~
wml:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.com/DTD/wml_1.1.xml">
<wml>
  <card id="main1" title="main card">
    <onevent type="ontimer">
      <go href="http://localhost:8080/jsp/mainmenu.jsp" />
    </onevent>
    <timer value="60" />
    <do type="accept" label="next">
      <go href="http://localhost:8080/jsp/mainmenu.jsp" />
    </do>
    <do type="prev">
      <noop />
    </do>
    <p>
          Welcome 123  to AirBank!
        </p>
  </card>

</wml>

代码:
 //定义XMLDocument
                XmlDocument xmlDocument = new XmlDocument();

                //定义XML文档头文件
                XmlDeclaration xmlDeclaration = xmlDocument.CreateXmlDeclaration("1.0", "utf-8", null);
                //增加XML文档头
                xmlDocument.AppendChild(xmlDeclaration);

                //定义XML的根
                XmlElement xmlRoot = xmlDocument.CreateElement("name");
                //添加XML的根
                xmlDocument.AppendChild(xmlRoot);
                //定义节点
                XmlNode xmlElement;

                //循环创建节点
                //创建XML根的节点
                xmlElement = xmlDocument.CreateElement("first");
                xmlElement.InnerText = "123";
                xmlRoot.AppendChild(xmlElement);
                XslCompiledTransform xls = new XslCompiledTransform();
                xls.Load(ctx.Server.MapPath("~/welcome.xslt"));
                MemoryStream stream = new MemoryStream();
                xls.Transform(xmlDocument.CreateNavigator(), null, stream);
                stream.Position = 0;
                //the encoding attribute specified in the xsl:output node is utf-8,
                //so here we read the output stream using the System.Text.Encoding.UTF8 correspondingly
                StreamReader reader = new StreamReader(stream, System.Text.Encoding.UTF8);
                ctx.Response.Write(reader.ReadToEnd());
                reader.Close();
                stream.Close();

标签:, , , ,
20071114 xml xlst WML c# 文件 - 八月 21, 2008 by yippee

20071114 xml xlst WML c# 文件
http://www.yippeesoft.com

xml:
<?xml version="1.0" encoding="utf-8" ?>
<name>
  <first>Ben</first>
  <last>Sifuentes</last>
</name>

xlst~~~~~
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml"
   indent="yes"
   media-type="text/vnd.wap.xml"
   omit-xml-declaration="no"
   doctype-public="-//WAPFORUM//DTD WML 1.1//EN"
   doctype-system="http://www.wapforum.com/DTD/wml_1.1.xml"
/>
  <xsl:template match="/">
    <wml>
      <card id="main1" title="main card">
        <onevent type="ontimer">
          <go href="http://localhost:8080/jsp/mainmenu.jsp"/>
        </onevent>
        <timer value="60"/>
        <do type="accept" label="next">
          <go href="http://localhost:8080/jsp/mainmenu.jsp"/>
        </do>
        <do type="prev">
          <noop/>
        </do>
        <p>
          Welcome <xsl:value-of select="/name/first"/>
          <xsl:text> </xsl:text>
          <xsl:value-of select="/name/last"/> to AirBank!
        </p>
      </card>
    </wml>
  </xsl:template>
</xsl:stylesheet>

~~
wml:
<?xml version="1.0" encoding="utf-16"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.com/DTD/wml_1.1.xml">
<wml>
  <card id="main1" title="main card">
    <onevent type="ontimer">
      <go href="http://localhost:8080/jsp/mainmenu.jsp" />
    </onevent>
    <timer value="60" />
    <do type="accept" label="next">
      <go href="http://localhost:8080/jsp/mainmenu.jsp" />
    </do>
    <do type="prev">
      <noop />
    </do>
    <p>
          Welcome Ben Sifuentes to AirBank!
        </p>
  </card>

</wml>

代码:
 XmlDataDocument xmldoc = new XmlDataDocument();
                xmldoc.Load(ctx.Server.MapPath("~/welcome.xml"));
                XslTransform xls = new XslTransform();
                xls.Load(ctx.Server.MapPath("~/welcome.xslt"));
                StringWriter fs = new StringWriter();
                xls.Transform(xmldoc, null, fs, null);

                ctx.Response.Write(fs.ToString());  

标签:, , , ,