This is a discussion on XML Tips within the XML and SOAP forums, part of the Web Development category; We started new thread for XML related tips and also issue handling so guys post some new information related to ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| We started new thread for XML related tips and also issue handling so guys post some new information related to XML ![]() |
| Sponsored Links |
| |||
| What is XML? XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display data XML tags are not predefined. You must define your own tags XML is designed to be self-descriptive
__________________ R.Sundar Raja |
| |||
| What is the difference between XML and HTML? XML is not a replacement for HTML. XML and HTML were designed with different goals: XML was designed to transport and store data, with focus on what data is. HTML was designed to display data, with focus on how data looks. HTML is about displaying information, while XML is about carrying information.
__________________ R.Sundar Raja |
| |||
| XML is Used to Create New Internet Languages: Here are some examples: 1. XHTML the latest version of HTML 2. WSDL for describing available web services 3. WAP and WML as markup languages for handheld devices 4. RSS languages for news feeds 5. RDF and OWL for describing resources and ontology 6. SMIL for describing multimedia for the web
__________________ R.Sundar Raja |
| |||
| Difference between XML and HTML : " XML User definable tags Content driven End tags required for well formed documents Quotes required around attributes values Slash required in empty tags HTML Defined set of tags designed for web display Format driven End tags not required Quotes not required Slash not required
__________________ Vignesh $Live It The Way You Love It$ |
| |||
| Rules for making a tag name in XML : " Rules for making a tag name are 1.It should start with a letter or underscore(_) 2.There are no reserved words , but however xml(in any case) should not be used as a tag name 3.It can include digits, hyphen,periods, ':' can be used but best avoided because it is used for the namespace.
__________________ Vignesh $Live It The Way You Love It$ |
| |||
| Differences between SAX and DOM parsers : Both SAX and DOM are used to parse the XML document. Both has advantages and disadvantages and can be used in our programming depending on the situation SAX: 1. Parses node by node 2. Doesnt store the XML in memory 3. We cant insert or delete a node 4. Top to bottom traversing DOM : 1. Stores the entire XML document into memory before processing 2. Occupies more memory 3. We can insert or delete nodes 4. Traverse in any direction. If we need to find a node and doesnt need to insert or delete we can go with SAX itself otherwise DOM provided we have more memory.
__________________ Vignesh $Live It The Way You Love It$ |
| |||
| Schema : "SCHEMA is nothing but METADATA. The schema holds all the information of the xml file that is to be deployed in the project. Metatdata is nothing about data about data since we know that xml is used for data representation language we will be able to understand what metadata is. Metadata includes the tags that is going to be exchanged to and fro from another xml file. "
__________________ Vignesh $Live It The Way You Love It$ |
| |||
| Limitations of a DTD : " DTD (DATA TYPE DEFINITION ) which supervises two conditions namely well formedness and closeness of the xml file. So the user should be aware of what tags he was put into use of this xml file 'A' should be intimated to another application's XML file 'B', by then our xml file will interact with the another xml file, this is the major limitation and mandatory issue that the developers should follow. "
__________________ Vignesh $Live It The Way You Love It$ |
| |||
| XML file : " SAX, event based XML parser is probably what is needed to search huge file. DOM store the whole content on memory which is in huge file is not good since it uses a lot of memory. SAX is event based that handle XML elements when it find it."
__________________ Vignesh $Live It The Way You Love It$ |
| |||
| CDATA section in XML : "CDATA in XML is the character data is is not parsed by the XML Processor. If there is a section in the document that you do not want the XML processor to parse, then it can be enclosed in <![CDATA[ ......................]]> "
__________________ Vignesh $Live It The Way You Love It$ |
| |||
| Entity Referencing : " Referencing the entity by name causes it to be inserted into the document in place of the entity reference. To create an entity reference, the entity name is surrounded by an ampersand and a semicolon, like this: &entityName; "
__________________ Vignesh $Live It The Way You Love It$ |
| |||
| The XML DOM The XML DOM (XML Document Object Model) defines a standard way for accessing and manipulating XML documents. The DOM views XML documents as a tree-structure. All elements can be accessed through the DOM tree. Their content (text and attributes) can be modified or deleted, and new elements can be created. The elements, their text, and their attributes are all known as nodes. In the example below we use the following DOM reference to get the text from the <to> element: xmlDoc.getElementsByTagName("to")[0].childNodes[0].nodeValue * xmlDoc - the XML document created by the parser. * getElementsByTagName("to")[0] - the first <to> element * childNodes[0] - the first child of the <to> element (the text node) * nodeValue - the value of the node (the text itself) |
| |||
| The HTML DOM The HTML DOM (HTML Document Object Model) defines a standard way for accessing and manipulating HTML documents. All HTML elements can be accessed through the HTML DOM. In the example below we use the following DOM reference to change the text of the HTML element where id="to": document.getElementById("to").innerHTML= * document - the HTML document * getElementById("to") - the HTML element where id="to" * innerHTML - the inner text of the HTML element |
| |||
| The XMLHttpRequest object is the developers dream, because you can: * Update a web page with new data without reloading the page * Request data from a server after the page has loaded * Receive data from a server after the page has loaded * Send data to a server in the background The XMLHttpRequest object is supported in all modern browsers. |
| |||
| XML Namespaces provide a method to avoid element name conflicts. |
| |||
| CDATA - (Unparsed) Character Data The term CDATA is used about text data that should not be parsed by the XML parser. Characters like "<" and "&" are illegal in XML elements. "<" will generate an error because the parser interprets it as the start of a new element. "&" will generate an error because the parser interprets it as the start of an character entity. Some text, like JavaScript code, contains a lot of "<" or "&" characters. To avoid errors script code can be defined as CDATA. Everything inside a CDATA section is ignored by the parser. A CDATA section starts with "<![CDATA[" and ends with "]]>": |
| |||
| Why an XML Editor? Today XML is an important technology, and development projects use XML-based technologies like: * XML Schema to define XML structures and data types * XSLT to transform XML data * SOAP to exchange XML data between applications * WSDL to describe web services * RDF to describe web resources * XPath and XQuery to access XML data * SMIL to define graphics To be able to write error-free XML documents, you will need an intelligent XML editor! |
| |||
| XML Editors Professional XML editors will help you to write error-free XML documents, validate your XML against a DTD or a schema, and force you to stick to a valid XML structure. An XML editor should be able to: * Add closing tags to your opening tags automatically * Force you to write valid XML * Verify your XML against a DTD * Verify your XML against a Schema * Color code your XML syntax |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/xml-soap/5166-xml-tips.html | |||
| Posted By | For | Type | Date |
| DiscussWeb IT Community - Technical Support and Technology Discussions | This thread | Refback | 02-11-2008 03:12 AM |