XML分解实例
原贴: http://topic.csdn.net/u/20100414/11/c69748ac-e0b2-490f-bde9-7c5284c3660c.html?seed=1832202493
declare @xml xml=
'<upd:Update xmlns:lar="http://schemas.microsoft.com/msus/2002/12/LogicalApplicabilityRules" xmlns:cmd="http://schemas.microsoft.com/msus/2002/12/UpdateHandlers/CommandLineInstallation" xmlns:bar="http://schemas.microsoft.com/msus/2002/12/BaseApplicabilityRules" xmlns:upd="http://schemas.microsoft.com/msus/2002/12/Update">
<upd:UpdateIdentity UpdateID="9f79459a-d72e-49fc-acb0-1adbb2e63686" RevisionNumber="103"/>
<upd:Properties DefaultPropertiesLanguage="en" UpdateType="Software" Handler="http://schemas.microsoft.com/msus/2002/12/UpdateHandlers/CommandLineInstallation" PublicationState="Published" CreationDate="2005-04-26T08:21:13.989Z" PublisherID="395392a0-19c0-48b7-a927-f7c15066d905" MaxDownloadSize="3320008" MinDownloadSize="0">
<upd:InstallationBehavior RebootBehavior="CanRequestReboot"/>
<upd:Language>zh-cn</upd:Language>
</upd:Properties>
<upd:LocalizedPropertiesCollection>
<upd:LocalizedProperties>
<upd:Language>en</upd:Language>
<upd:Title>Critical Update for SQL Server 2000 Desktop Engine (Windows) on Windows Server 2003 (KB829358)</upd:Title>
</upd:LocalizedProperties>
</upd:LocalizedPropertiesCollection>
<upd:Relationships>
<upd:Prerequisites>
<upd:UpdateIdentity UpdateID="30b6a809-9ba3-4c0f
相关文档:
XML 和 JSON 是当今常用的两种数据描述与传输的格式,特别是涉及到 JS 时使用 JSON 颇为频繁。自然,在 Java 的世界里少不了完成 JavaBean 与这两种格式相互转换的组件,那就是 XStream 和 JSON-lib。这里我简单记下 XStream 的用法。
其实相类似的工具早已有之。如果用过 DWR 的同志,一定有印像,DWR 进行远 ......
<asp:DropDownList ID="compactType" runat="server" AutoCallBack="True" Width="153px"> </asp:DropDownList>
<?xml version="1.0" encoding="utf-8" ?>
<roots>
<root>
<id>1</id>
<Culture> ......
已知有一个XML文件(bookstore.xml)如下:
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price> ......