Wednesday, October 21, 2009

Free XML Application Testing Tools

Following tools will help to test the sample XML applications.

 

Kernow 1.6

 

(http://kernowforsaxon.sourceforge.net/)

    XML Schema

                          Testing schemas is fun

    XQuery

                          Helped me a lot while I was creating XQuerys for Oracle OSB 10gR3 project for messaging between SAIP

                         (SOAP based client) and Oracle Beehive (RESTFul based service provider).
                          However for XML Schema based programs  I had to switch back to JDeveloper. As it ask to
                         upgrade inbuilt SAXON to validating SAXON parser.

    XSLT

                        Running XSLT program against a XML in sandbox mode
                        is real fun. Supports Saxon extensions with EXSLT
                        extensions.

Mozilla based RESTTest

 

                          Quick and easy way to test RESTFul based web service providers.
                          Truly amazing implementation on apache HTTPClient, I suppose.

 

Araxis Merge

http://www.araxis.com/merge/Download.html

                     Merge is the visual file comparison (diff), merging and folder synchronization application from Araxis.
                     Use it to compare and merge source code, web pages, XML and other text files with native application performance.
                     Directly open and compare the text from Microsoft Office (Word and Excel), OpenDocument, PDF and RTF files.
                     Compare images and binary files.
                     Synchronize folders.
                     Perform code reviews and audits.
                     Work with folder hierarchies containing thousands of files.
                     Merge integrates with many SCM (version control) systems and other applications.

XML

   -                                        

<?xml version=""  encoding=""  standalone="" ?>

 

Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML (ISO 8879).

XML (Extensible Markup Language) is a general-purpose specification for creating custom markup languages or say XML applications.(XML is in itself an application of SGML optimized for automated parsing).

 

Usage and alternatives


            Sharing structured data especially via the Internet,
            Encode documents,
            Serialize data    (

-
                        JSON

-  
                                
JavaScript Object Notation- Text based, lightweight, human 
                                  readable computer data interchange format.
                                  application/json, .json filename.
                                  The JSON format is often used for serialization and transmitting 
                                  structured data over a network connection. 
                                  Its main application is in Ajax web application programming,
                                  where it serves as an alternative to the XML format.
                                  Also very much in use in RESTFull based web services. 
                                  For instance Oracle Beehive (Collaboration Suite)
                                   RESTFul services use both XML and JSON formats.

                               Although JSON was based on a subset of the JavaScript programming language
                               (specifically, Standard ECMA-262 3rd Edition—December 1999[1]).
                               It is considered to be a language-independent data format.
                               Code for parsing and generating JSON data is readily available for a large 
                               variety of programming languages.

 

                                    JSON Example

                                     {
                                           "firstName": "John",
                                           "lastName": "Smith",
                                            "address": {
                                                               "streetAddress": "21 2nd Street",
                                                                "city": "New York",
                                                                "state": "NY",
                                                                "postalCode": "10021"
                                                           },
                                           "phoneNumbers": {
                                                                    { "type": "home", "number": "212 555-1234" },
                                                                    { "type": "fax", "number": "646 555-4567" }
                                                                  }
                                     }

                            The equivalent for the above in XML:

                                    <Person firstName="John" lastName="Smith">
                                      <Address>
                                           <streetAddress>21 2nd Street</streetAddress>
                                           <city>New York</city>
                                           <state>NY</state>
                                           <postalCode>10021</postalCode>
                                       </Address>
                                      <phoneNumber type="home">
                                                                     212 555-1234
                                       </phoneNumber>
                                      <phoneNumber type="fax">
                                                                     646 555-4567
                                      </phoneNumber>
                                  </Person>

                            JSON Schema is a specification for a JSON-based format for defining the structure of JSON data.  
                            JSON Schema is based on the concepts from XML Schema, RelaxNG, and Kwalify,

                            XML being a general purpose markup language, they are syntactically more complex and bigger in file size than JSON, which, in contrast, is specifically designed for data interchange. Both lack an explicit mechanism for representing
                            large binary data types such as image data (although binary data can be serialized in either case by applying a general purpose binary-to-text encoding scheme).
                            The most used forms of binary-to-text encodings are:

                                hexadecimal
                                base64
                                quoted-printable
                                uuencoding
                                yEnc
                                Ascii85
                                BinHex
                                Percent encoding

-

                        YAML

- 
                            Both functionally and syntactically, JSON is effectively a subset of YAML.[14]
                            The common YAML library (Syck) also parses JSON. 
                       

                  S-Expressions


                        
     

XML
    Version 1.0
     Version 1.1

    encoding is optional.
            IANA values :- Internet Assigned Numbers Authority.

                FYI ..IANA also defines the media types (http://www.iana.org/assignments/mediatypes/).
                e.g.    (text/html)
                    (text/xml)        (not preferred)        (ASCII character set)
                    (application/xml)    (preferred)        (Unicode character set)
                    (image/jpeg)
                    (application/json)

            By Default Unicode character-set will be assumed and parser may use the first few bytes of the file to guess the encoding

            UTF-8 versus UTF-16
            UTF-16 requires 0xFEFF/0xFFFE byte order mark. Preceding the XML declaration. 

    standalone is optional.
            Default value is "No".
            Documents that have a DTD may have the value of "yes", if DTD doesn't change the document content.

Originally designed to meet the challenges of large-scale electronic publishing,
XML is also playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere.

    [[1]]    It is classified as an extensible language, because it allows the user to define the mark-up elements.

    [[2]]     XML's purpose is to aid information systems in sharing structured data, especially via the Internet,
        to encode documents, and to serialize data; in the last context, it compares with text-based serialization
        languages such as JSON, YAML and S-Expressions.

XML is recommended by the World Wide Web Consortium (W3C).

It is a fee-free open standard.