professional documents
home
Profile
docsters
request
Blogs
Upload
about me
contact me
user photo
Mayur
submit clear
Powerpoint

Dot Net Presentation 6 center doc

XML SGML  Standard  Formal generalized markup language system designed for building test markup languages. recognized standard for text information processing that provide an organized way to structure the content for broad use.  Internationally XML A tag-based meta language for structured data representation data hierarchically (in a tree)  Designed  Represents  Provides  context to data (makes it meaningful) presentation (HTML) from data (XML) Self-describing data  Separates  An A open W3C standard vs. HTML, which is an implementation of SGML subset of SGML  XML and Structured Data  Pre-XML representation of data: “PO-1234”,”CUST001”,”X9876”,”5”,”14.98”  XML representation of the same data: PO-1234 CUST001 X9876 5 14.98 Components of an XML Document  Elements  Each element has a beginning and ending tag  ...  Elements can be empty ()  Attributes  Describes an element; e.g. data type, data range, etc.  Can only appear on beginning tag An XML Document The Autobiography of Benjamin Franklin Benjamin Franklin 8.99 The Confidence Man Herman Melville 11.99 Rules For Well-Formed XML  There must be one, and only one, root element be properly nested  Sub-elements must  A tag must end within the tag in which it was started  Attributes  are optional Defined by an optional schema  Attribute values must be enclosed in “” or „‟ instructions are optional  Processing  XML  is case-sensitive and are not the same type of element Well-Formed XML?  No, CHILD2 and CHILD3 do not nest properly. This is element 1 Number 3  No, there are two root elements This is element 1 This is another element 1 Well-Formed XML?  Yes. This is element 1 Namespaces: Overview  Part of XML’s extensibility  Allow authors to differentiate between tags of the same name (using a prefix) by a URI (Uniform Resource Identifier)  Identified  Namespace declaration examples: xmlns: bk = “http://www.example.com/bookinfo/” Namespace declaration Prefix URI (URL) Namespaces: Examples All About XML Joe Developer 19.99  An XML namespace declared without a prefix becomes the default namespace for all sub-elements. All elements without a prefix will belong to the default namespace.  All About XML Joe Developer CDATA, PCDATA AND Entity Ref.  Actual data : 0 < x < 100 < [CDATA [ 0 < x < 100 ] ] > Or  0 < x < 100 XML Parsers    SAX ( Simple API for XML) API to allow developers to read/write XML data Event based  Uses a “push” model  StartDocument      StartElement Characters ----------------EndElement EndDocument   Sequential access only (data not cached) Requires less memory to process XML data  SAX has less overhead (uses small input, work and output buffers) than the DOM The XML DOM  XML Document Object Model (DOM)  Provides a programming interface for manipulating XML documents in memory a set of objects and interfaces that represent the content and structure of an XML document a program to traverse an XML tree  Includes  Enables  Allows elements, attributes, etc., to be added/deleted in an XML tree new XML documents to be created programmatically  Allows XPath   XML Path Language Uses:  General purpose query language for identifying nodes in an XML document  In XSL transformation  Supports standard comparison, Boolean and mathematical operators (=, <, and, or, *, +, etc.) Contextual – the results depend on current node  XPath Query Examples ./author (finds all author elements within current context) /bookstore (find the bookstore element at the root) /* //author (find the root element) (find all author elements anywhere in document) /bookstore[@specialty = “textbooks”] (find all bookstores where the specialty attribute = “textbooks”) /author/* (find all elements of author element) //author/@* (find all attributes of author element) XSL  Language  Specifies  for expressing document styles the presentation of XML of: More powerful than CSS  Consists    XSLT XPath XSL Formatting Objects (XSL-FO) Transformations: Overview  XSLT – a language used to transform XML data into a different form (commonly XML or HTML) XML, HTML, … XSLT Transformations: Example Scootney Publishing Regional Sales Report Sales Report West Coast ... /> /> /> /> Transformations: Example

... ... ...
Region\Quarter Q
color:red; color:green; Transformations: Example .NET & XML  XML Namespaces in .NET System.Xml .Xsl .XPath .Schema .Serialization System.Xml Namespace    Overall namespace for classes that provide XML support Classes for creating, editing, navigating XML documents Reading, writing and manipulating documents via the DOM   Use the XmlDocument class for XML documents Use the XmlDataDocument class relational or XML data XmlElement, XmlAttribute, XmlComment, etc Used by the XmlDocument and XmlDataDocument classes  Classes that correspond to every “type” of XML “element”:   XmlDocument  Properties of Interest:   ChildNodes: Returns all the children of the current node DocumentType: Gets the DOCTYPE declaration node      DocumentElement: Returns the root XmlElement XmlResolver: Used to resolve DTD & schema references FirstChild: Returns the first child of the current node ParentNode: Returns the parent of the current node Value: Returns the (string) value of the current node  Methods of Interest  CreateComment: Creates a comment node    CreateElement: Creates an element node Load: Loads XML data using a URL, file, Stream, etc Save: Saves the XML document to a file, Stream, or writer ReadXML.cs using System; using System.Xml; class MyApp { static void Main() { XmlDocument doc = new XmlDocument(); doc.Load("E:\\Workshop\\book.xml"); XmlNodeList nodes = doc.GetElementsByTagName("book"); foreach(XmlNode node in nodes) { Console.WriteLine("{0}",node["author"].InnerText); } } }
rate this doc
email this doc
embed this doc
add to folder
digg reddit stumble delicious
flag this doc
295
63
6(1)
0
4/17/2008
English
search termpage on Googletimes searched
Preview

Dot Net Presentation 2

mayurck291 4/17/2008 | 230 | 59 | 0 | technology
Preview

Dot Net Presentation 4

mayurck291 4/17/2008 | 510 | 58 | 0 | technology
Preview

Dot Net Presentation 1

mayurck291 4/17/2008 | 469 | 61 | 1 | technology
Preview

Dot Net Presentation 3

mayurck291 4/17/2008 | 259 | 55 | 0 | technology
Preview

Dot Net Presentation 5

mayurck291 4/17/2008 | 751 | 66 | 0 | technology
Preview

Designated Copyright Agent - PALACE dot NET,

CopyrightAgent 3/30/2008 | 17 | 0 | 0 | legal
Preview

net_notes

sanyam 6/1/2008 | 99 | 15 | 0 | educational
Preview

Microsoft_Net

sanyam 6/1/2008 | 95 | 5 | 0 | educational
Preview

Designated Copyright Agent - alpha dot net, corp.

CopyrightAgent 3/30/2008 | 100 | 0 | 0 | legal
Preview

Designated Copyright Agent - Brazoria Dot Net, Inc.

CopyrightAgent 3/30/2008 | 89 | 0 | 0 | legal
Preview

Designated Copyright Agent - Voxel Dot Net, Inc.

CopyrightAgent 3/30/2008 | 17 | 0 | 0 | legal
Preview

Wharton Presentation - Monetizing the Net - Supernova 2008

MissPowerPoint 6/30/2008 | 59 | 3 | 0 | business
Preview

Wrox - Beginning Visual Basic .NET Database Programming

sanyam 6/1/2008 | 249 | 1354 | 0 | educational
Preview

Groups and electron dot diagrams

LisaB1982 5/30/2008 | 34 | 0 | 0 | educational
Preview

WORLD_TIME[1]

mayurck291 4/24/2008 | 118 | 35 | 0 | creative
Preview

TRAINS_INDIA

mayurck291 4/24/2008 | 413 | 24 | 0 | creative
Preview

TaxCalc_2006

mayurck291 4/24/2008 | 316 | 14 | 0 | creative
Preview

STD

mayurck291 4/24/2008 | 145 | 20 | 0 | creative
Preview

ringtones

mayurck291 4/24/2008 | 160 | 15 | 0 | creative
Preview

PICNIC_SPOTS

mayurck291 4/24/2008 | 1093 | 24 | 1 | creative
Preview

NAME___ITS_MEANING

mayurck291 4/24/2008 | 228 | 48 | 0 | creative
Preview

life_time_calender

mayurck291 4/24/2008 | 135 | 22 | 0 | creative
Preview

clock

mayurck291 4/24/2008 | 140 | 20 | 0 | creative
Preview

celldecoder

mayurck291 4/24/2008 | 135 | 19 | 0 | creative
dotnet xml attribute optional11
xml sax in dot11
dotnet meta tree21
adding cdata xml dotnet31
getelementsbytagname !doctype vb11
presentation11
xml api in dotnet11
brazoria dot net11
"system11
 
review this doc