An XML Format for Presence Buddy Lists Speaker
An XML Format for Presence Buddy Lists Speaker: Ching-Chen Chang Date: 2006. 12. 25
Outline n n n Introduction to XML Format Buddy List XML Format for Buddy Lists Example for Buddy Lists Reference
Introduction to XML(1/2) n n n XML(e. Xtensible Markup Language) XML is a subset of SGML (Standard Generalized Markup Language) HTTP、XML、SGML XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to describe data
Introduction to XML(2/2) n n XML tags are not predefined. You must define your own tags XML uses a Document Type Definition (DTD) or an XML Schema to describe the data XML with a DTD or XML Schema is designed to be self-descriptive XML is a W 3 C Recommendation
XML Format n n XML Elements are Extensible Attributes are used to provide additional information about elements. XML with correct syntax is Well Formed XML validated against a DTD is Valid XML.
Buddy List If the buddy List is stored at local hardware, users only can use this computer. n If the buddy List is stored at the remote server, users can use every computer which has the application. n
XML Format for Buddy Lists(1/2) Buddylist Element <!ELEMENT buddylist (title, (group | buddy)* )> n Group Element <!ELEMENT group (title, (group | buddy)* )> n
XML Format for Buddy Lists(2/2) Buddy Element <!ELEMENT buddy (#PCDATA)> <!ATTLIST buddy href CDATA #REQUIRED date CDATA #IMPLIED> n Title Element <!ELEMENT title (#PCDATA)> n
Example for Buddy Lists(1/2) n <? xml version="1. 0"? > <!DOCTYPE buddylist PUBLIC "-//IETF//DTD RFCxxxx XBUDDY 1. 0//EN" "xbuddy. dtd"> <buddylist> <title>Buddy list for John Doe</title> <group><title>Friends</title> <buddy uri="sip: jane. doe@example. com; method=SUBSCRIBE" date="959970634">Jane Doe</buddy> <buddy uri="sip: john. smith. company. com; method=SUBSCRIBE">John Smith</buddy> </group> <group><title>Coworkers</title> <buddy uri="sip: eric. summer@supersoft. com; method=SUBSCRIBE">Eric Summer</buddy> <buddy uri="sip: jim. nielsin@supersoft. com; method=SUBSCRIBE"> Boss - Jim</buddy> </group> </buddylist> >
Example for Buddy Lists(2/2) n <? xml version="1. 0"? > <!DOCTYPE buddylist PUBLIC "-//IETF//DTD RFCxxxx XBUDDY 1. 0//EN" "xbuddy. dtd"> <buddylist> <title> <p xmlns="http: //www. w 3. org/1999/xhtml"> <b><i><font size="+1">Important</font></i></b> People </p> </title> <buddy uri="sip: leonhard. euler@math. spbu. ru; method=SUBSCRIBE"> <math xmlns="http: //www. w 3. org/1998/Math. ML"> <mrow> <msup> <mi>&Exponential. E; </mi> <mrow> <mi>π</mi><mo>&Invisible. Times; </mo><mi>&Imaginary. I; </mi> </mrow> </msup> <mo>+</mo><mn>1</mn> </mrow> <mo>=</mo><mn>0</mn> </mrow> </math> </buddy> </buddylist>
Reference n n XML中文規格書 http: //www. twtec. org. tw/content/application/ta ipei/cnt. class/index. php? grpid=5&vroot=&cnt grp_ordinal=000200070004&cnt_id=102 Internet draft--An XML Format for Presence Buddy Lists
- Slides: 11