您目前尚未登陆,请选择【登陆】或【注册
首页->全站代码->MyWebPages51aspx汉化最终版>>App-Code/FCKEditor/XmlUtil.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:MyWebPages51aspx汉化最终版
当前文件:文件类型 MyWebPagesStarterKit/App_Code/FCKEditor/XmlUtil.cs打开代码结构图
普通视图
		            
1/* 2 * FCKeditor - The text editor for internet 3 * Copyright (C) 2003-2005 Frederico Caldeira Knabben 4 * 5 * Licensed under the terms of the GNU Lesser General Public License: 6 * http://www.opensource.org/licenses/lgpl-license.php 7 * 8 * For further information visit: 9 * http://www.fckeditor.net/ 10 * 11 * "Support Open Source software. What about a donation today?" 12 * 13 * File Name: XmlUtil.cs 14 * Useful tools for XML. 15 * 16 * File Authors: 17 * Frederico Caldeira Knabben (fredck@fckeditor.net) 18 */ 19 20using System ; 21using System.Globalization ; 22using System.Xml ; 23 24namespace FredCK.FCKeditorV2 25{ 26 internal sealed class XmlUtil 27 { 28 private XmlUtil() 29 {} 30 31 public static XmlNode AppendElement( XmlNode node, string newElementName ) 32 { 33 return AppendElement( node, newElementName, null ) ; 34 } 35 36 public static XmlNode AppendElement( XmlNode node, string newElementName, string innerValue ) 37 { 38 XmlNode oNode ; 39 40 if ( node is XmlDocument ) 41 oNode = node.AppendChild( ((XmlDocument)node).CreateElement( newElementName ) ) ; 42 else 43 oNode = node.AppendChild( node.OwnerDocument.CreateElement( newElementName ) ) ; 44 45 if ( innerValue != null ) 46 oNode.AppendChild( node.OwnerDocument.CreateTextNode( innerValue ) ) ; 47 48 return oNode ; 49 } 50 51 public static XmlAttribute CreateAttribute( XmlDocument xmlDocument, string name, string value ) 52 { 53 XmlAttribute oAtt = xmlDocument.CreateAttribute( name ) ; 54 oAtt.Value = value ; 55 return oAtt ; 56 } 57 58 public static void SetAttribute( XmlNode node, string attributeName, string attributeValue ) 59 { 60 if ( node.Attributes[ attributeName ] != null ) 61 node.Attributes[ attributeName ].Value = attributeValue ; 62 else 63 node.Attributes.Append( CreateAttribute( node.OwnerDocument, attributeName, attributeValue ) ) ; 64 } 65 } 66} 67
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:MyWebPages51aspx汉化最终版
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号