How to use JQuery AJAX Method to Call an API?

In this blog in am going to explain that How to use JQuery AJAX Method to Call an API for to load data from external website or external File of etc, by calling APIs, and get the response in JSON or XML formats. So first thing I am going to create a html file and import jquery cdn. If you want to bootstrap css, & js cdn the you can copy from this link Click Here as below-

In this code I am using bootstrap cdn with jQuery cdn after that a Script tag in this script tag ajax function call with json data for getting data showing in cosole.log. If you using first time jQuery then you can right button of mouse and select inspect (Ctrl+shift+i) after that showing below tab then select console tab. When you click Here button from document then showing all data which retrieve.

Tagged : / / / /

XML Is the Here, the Now, and the Future

XML Is the Here, the Now, and the Future

XML is short for Extensible Markup Language, which is a specification developed by the World Wide Web Consortium (W3C). XML is a pared-down version of SGML, designed especially for Web documents. It allows designers to create their own customized tags, enabling the definition, transmission, validation, and interpretation of data between applications and between organizations.

Following are three good reasons why you should master XML:

  • XML is seen as a universal, open, readable representation for software integration and data exchange. IBM, Microsoft, Oracle, and Sun have built XML into database authoring.
  • .NET and J2EE (Java 2 Platform, Enterprise Edition) depend heavily on XML.
    • All ASP.NET configuration files are based on XML.
    • XML provides serialization or deserialization, sending objects across a network in an understandable format.
    • XML offers SOAP Web Services communication.
    • XML offers temporary data storage.
  • MSBuild and the future project files of Visual Studio will be in XML format. ANT is also XML based.

Thus, if you want to learn one language that will cover many tools and technologies no matter what platform you are working on, that language is XML. The main difference in all these build tools is not so much the feature set but the syntax. I get tired of learning all the quirks of new languages, but I’m happy to learn XML because it’s here to stay and it’s fairly easy to learn.

Tagged : / / / / /

Creating xml report using Cloc

rajeshkumar created the topic: Creating xml report using Cloc

Hi,

Cou;d you please help me on following command as following command is not able to generate CLOC reports for me.

cloc-1.50.exe –diff src49 src51
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

How to read XML file by using shell script ?

read-xml-file-using-shell-script

This was like the first time where I had to write something that will be able to read something out of a XML file using a shell script. Usually I would use Python/Perl as my favorite choices in such a scenario but in this one I really *had* to do all within a shell script.

This is an example of the type of XML file I had to read:

Fixed a new bug
Shoaib Mir
Sun, 02 May 2010
shoaibmir[@]gmail.com

I ended up having a shell script like this:

#!/bin/bash

#Looking for four keywords in here
for key in changelog name date email
do
OUTPT=`grep $key log.xml | tr -d '\t' | sed 's/^\([^<].*\)$/\1/' `
eval ${key}=`echo -ne \""${OUTPT}"\"`
done

# Getting the results in four specific arrays
changelogarr=( `echo ${changelog}` )
namearr=( `echo ${name}` )
datearr=( `echo ${date}` )
emailarr=( `echo ${email}` )

#Print all Arrays
echo ${changelogarr[@]}
echo ${namearr[@]}
echo ${datearr[@]}
echo ${emailarr[@]}

Which gives me an output:

shoaib@shoaib-desktop:~/Desktop$ ./readxml.sh
Fixed a new bug Shoaib Mir
Sun, 02 May 2010
shoaibmir[@]gmail.com

 

Reference:

Reading XML file using shell script

 

Tagged : / / / / / / / / / / / / / / /