xml procedure
DECLARE @XMLdoc XML
SET @XMLdoc =
'<Book name="SQL Server 2000 Fast Answers">
<Chapters>
<Chapter id="1" name="Installation, Upgrades">
<CreateDate>2009-12-30</CreateDate>
</Chapter>
<Chapter id="2" name="Configuring SQL Server"/>
<Chapter id="3" name="Creating and Configuring Databases">
<CreateDate>2009-12-30</CreateDate>
</Chapter>
<Chapter id="4" name="SQL Server Agent and SQL Logs"/>
</Chapters>
</Book>'
DECLARE @docpointer int
EXEC sp_XML_preparedocument @docpointer OUTPUT, @XMLdoc
SELECT *
from OPENXML (@docpointer, '/Book/Chapters/Chapter',1)
WITH (Chapter int '@id',
ChapterNM varchar(50) '@name',
CreateDate VARCHAR(50) './CreateDate/text()')
GO
½á¹ûÈçÏ£º
Chapter ChapterNM CreateDate
1 Installation, Upgrades 2009-12-30
2 Configuring SQL Server NULL
3 Creating and Configuring Databases 2009-12-30
4 SQL Server Agent and SQL Logs
Ïà¹ØÎĵµ£º
1£©DOM£¨JAXP Crimson½âÎöÆ÷£©
DOMÊÇÓÃÓëƽ̨ºÍÓïÑÔÎ޹صķ½Ê½±íʾXMLÎĵµµÄ¹Ù·½W3C±ê×¼¡£DOMÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐÑ°ÕÒÌض¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµºÍ¹¹Ôì²ã´Î½á¹¹£¬È»ºó²ÅÄÜ×öÈκι¤×÷¡£ÓÉÓÚËüÊÇ»ùÓÚÐÅÏ¢²ã´ÎµÄ£¬Òò¶ ......
XML Schema annotation ÔªËØ
¶¨ÒåºÍÓ÷¨
annotation ÔªËØÊÇÒ»¸ö¶¥²ãÔªËØ£¬¹æ¶¨ schema µÄ×¢ÊÍ¡£
×¢ÊÍ£º¿ÉÒÔ°üº¬ appinfo ÔªËØ£¨ÓÉÓ¦ÓóÌÐòʹÓõÄÐÅÏ¢£©ºÍ documentation ÔªËØ£¨ÓÉÓû§¶ÁÈ¡»òʹÓõÄ×¢ÊÍ»òÎı¾£©¡£
ÔªËØÐÅÏ¢
씀˵Ã÷
³öÏÖ´ÎÊý
ÔÚ¸¸ÔªËØÖÐÒ»´Î¡£
......
/**
* ftpÉÏ´«ÎļþJavaBean
* @author Administrator
*
*/
public class FtpBean {
//ftp·þÎñµØÖ·
private String ftpUrl="";
//ftp̞
private String userName="";
//ftpÃÜÂë
private String passWord="";
public String getF ......
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
SAXReader reader = new SAXReader();
try {
Document doc = reader.read("ParserSQL.xml");
&n ......
/// <summary>
/// Ö§³ÖXMLÐòÁл¯µÄ·ºÐÍ Dictionary
/// </summary>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TValue"></typeparam>
[XmlRoot("SerializableDictionary")]
public class SerializableDictionary<TKey, TValue& ......