IT Community - Software Programming, Web Development and Technical Support

XML Tips

This is a discussion on XML Tips within the XML and SOAP forums, part of the Web Development category; XML file : " SAX, event based XML parser is probably what is needed to search huge file. DOM store the ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > XML and SOAP

Register FAQ Members List Calendar Mark Forums Read

Reply
 
Thread Tools Display Modes
  #11  
Old 02-11-2008, 03:41 AM
vigneshgets vigneshgets is offline
D-Web Genius
 
Join Date: Mar 2007
Posts: 904
vigneshgets is on a distinguished road
Thumbs up Re: XML Tips

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$
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12  
Old 02-11-2008, 03:46 AM
vigneshgets vigneshgets is offline
D-Web Genius
 
Join Date: Mar 2007
Posts: 904
vigneshgets is on a distinguished road
Thumbs up Re: XML Tips

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$
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13  
Old 02-11-2008, 04:30 AM
vigneshgets vigneshgets is offline
D-Web Genius
 
Join Date: Mar 2007
Posts: 904
vigneshgets is on a distinguished road
Thumbs up Re: XML Tips

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$
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14  
Old 02-11-2008, 08:19 PM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 801
vadivelanvaidyanathan is on a distinguished road
Default Re: XML Tips

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)
__________________
V.Vadivelan

There never a wrong time to do the right thing.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15  
Old 02-11-2008, 08:19 PM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 801
vadivelanvaidyanathan is on a distinguished road
Default Re: XML Tips

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
__________________
V.Vadivelan

There never a wrong time to do the right thing.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16  
Old 02-11-2008, 08:22 PM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 801
vadivelanvaidyanathan is on a distinguished road
Default Re: XML Tips

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.
__________________
V.Vadivelan

There never a wrong time to do the right thing.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17  
Old 02-11-2008, 08:44 PM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 801
vadivelanvaidyanathan is on a distinguished road
Default Re: XML Tips

XML Namespaces provide a method to avoid element name conflicts.
__________________
V.Vadivelan

There never a wrong time to do the right thing.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18  
Old 02-11-2008, 08:45 PM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 801
vadivelanvaidyanathan is on a distinguished road
Default Re: XML Tips

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 "]]>":
__________________
V.Vadivelan

There never a wrong time to do the right thing.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19  
Old 02-11-2008, 08:46 PM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 801
vadivelanvaidyanathan is on a distinguished road
Default Re: XML Tips

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!
__________________
V.Vadivelan

There never a wrong time to do the right thing.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20  
Old 02-11-2008, 08:47 PM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 801
vadivelanvaidyanathan is on a distinguished road
Default Re: XML Tips

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
__________________
V.Vadivelan

There never a wrong time to do the right thing.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SEO Tips ragavraj Search Engine Optimization 22 06-01-2009 12:39 AM
QTP tips senthilkannan Testing Tools 158 09-29-2008 05:56 AM
PHP Tips and Tricks Sabari PHP Programming 20 12-18-2007 05:26 AM
Tips for PPC vadivelanvaidyanathan Search Engine Optimization 0 05-22-2007 07:28 AM


All times are GMT -7. The time now is 06:49 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0