Wednesday, August 14, 2013

How to get/read data from xml file using jquery?

Code: 

$.ajax({
type: "GET",
url: "book.xml",
dataType:"xml",
success: function(xml) {
$(xml).find('attributes').each(function(){
var bg=$(this).find('background').text();
});
}
});

Explanation: Using this you can get the datas from the xml file.

How to remove unnecessary space between lines(coding in page) using dreamweaver?


  1. Open the file
  2. Click CTRL + F
  3. Select "Current document" in "Find in" (You can also select the folder if you have multiple files)
  4. Search in "Source code"
  5. Tick "Use regular expression"
  6. Type "[\r\n]{2,}" (without quotes) in "Find"
  7. Type "\n" (without quotes) in "Replace"
  8. Press "Replace All"