Question

what is XML and list advantages what is JSON and list advantages compare and contrast XML...

what is XML and list advantages

what is JSON and list advantages

compare and contrast XML vs JSON vs Flat File

convert below xml to json

<address>
   <billing>
       <street>westchester park dr</street>
       <city>college park</city>
       <state>MD</state>
       <zip>20020</zip>
   </billing>
   <shipping>
       <street>westchester park dr</street>
       <city>college park</city>
       <state>MD</state>
       <zip>20020</zip>
   </shipping>
</address>

correct below xml documents:

   <shipping>
       <street>westchester park dr</street>
       <city>college park</city>
       <state>MD</state>
       <zip>20020</zip>
   <shipping>

   <shipping>
       <street>westchester park dr</street>
       <city>college park</city>
       <state>MD</state>
       <zip>20020</zip>
   </Shipping>

   <shipping>
       <street>westchester park dr</street>
       <CITY>college park</city>
       <state>MD</state>
       <zip>20020</zip>
   </shipping>

convert below xml to any of your favorite flat file format

   <shipping>
       <street>westchester park dr</street>
       <CITY>college park</city>
       <state>MD</state>
       <zip>20020</zip>
   </shipping>

correct below json message:

{msg: "hello there"}

["hello there";"hello again"]

0 0
Add a comment Improve this question Transcribed image text
Answer #1

XML:-

XML stands for Extensible Markup Language. XML is a software- and hardware-independent tool for storing and transporting data. It is a text-based markup language derived from Standard Generalized Markup Language (SGML). XML tags identify the data and are used to store and organize the data, instead of displaying the data like html XML can not replace HTML in the near future, but it introduces new possibilities by adopting many successful features of HTML.

Advantages of xml:-

1. XML is platform independent and programming language independent, thus it can be used on any system and supports the technology change when that happens. Any application that can process XML can use your information, regardless of platform.

2.XML supports unicode.  This feature allows XML to transmit any information written in any human language.

3. XML is extendable. Create your own tags, or use tags created by others, that use the natural language of your domain, that have the attributes you need, and that makes sense to you and your users.

4.The data stored and transported using XML can be changed at any point of time without affecting the data presentation.

5.XML is readable and understandable, and no more difficult to code than HTML.

6. XML allows validation using DTD and Schema. This validation ensures that the XML document is free from any syntax error.

JSON:-

JSON (JavaScript Object Notation) stands for Javascript Object Notation which is light-weighted designed such that humans can easily read data interchange and its execution.

Advantages:-

1.JSON syntax is very small and light weighted that’s the reason it is faster language.

2 .It has wide range of supported browser compatibility with the operating systems so the applications made with the coding of JSON doesn't require much effort to make it all browser compatible.

3.JSON stores the data in the arrays so data transfer makes easier. It is the best tool for the sharing data of any size even audio, video etc.

4.JSON is a superior file format for web APIs and for web development.

5.JSON server side parsing is fast and becomes strong point that indicates us to use the JSON on server side.

comparision between xml json and flat file:-

xml:-

1 It is Extensible markup language.

2.It is derived from SGML.

3. It is a markup language and uses tag structure to represent data items.

4.It is more secured than JSON.

5.It supports namespaces.

6. It doesn’t supports array.

7. Its documents when compare to json and flat files are  difficult to read and interpret.

8. It has start and end tags.

9. It supports various encoding.

JSON:-

1. It is JavaScript Object Notation

2. It is based on JavaScript language.

3. It is a way of representing objects.

4. It is less secured than xml.

5.It does not provides any support for namespaces.

6. It supports array.

7. Its files are very easy to read as compared to XML.

8. It doesn’t use end tag.

9. It supports only UTF-8 encoding.

Text Files:-

1 Flat file is mostly used when data has to be exchanged between legacy systems where delimited text file are the most common mode of data transfer.

2.Flat files are easier to analyse.

3. Flat file syndication involves a lot of manual intervention in terms of Fields creation for mapping.setting their properties individually etc.

4. No particular structure can be maintained as all fields are maintained one after .Unlike in XML where we have Segments and fields inside segments.

5.Cannot be used for large data imports.

6. Very less secure

XML to JSON

{
"address": {
"billing": {
"street": "westchester park dr",
"city": "college park",
"state": "MD",
"zip": "20020"
},
"shipping": {
"street": "westchester park dr",
"city": "college park",
"state": "MD",
"zip": "20020"
}
}
}

--------------------------------

<billing>
       <street>westchester park dr</street>
       <city>college park</city>
       <state>MD</state>
       <zip>20020</zip>
   </billing>

   <shipping>
       <street>westchester park dr</street>
       <city>college park</city>
       <state>MD</state>
       <zip>20020</zip>
   </shipping>

   <shipping>
       <street>westchester park dr</street>
       <city>college park</city>
       <state>MD</state>
       <zip>20020</zip>
   </shipping>

-------------------------------------------

shiiping address ina any text file:-

westchester park dr

college park

MD

20020

----------------------------------------

{"msg":[

{"hello there"},

{"hello there"},

{"hello again"}

]

}

Add a comment
Know the answer?
Add Answer to:
what is XML and list advantages what is JSON and list advantages compare and contrast XML...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1.given: <address> <billing> <street>westchester park dr</street> <city>college park</city> <state>MD</state> <zip>21121</zip> </billing> <shipping> <street>westchester park dr&

    1.given: <address> <billing> <street>westchester park dr</street> <city>college park</city> <state>MD</state> <zip>21121</zip> </billing> <shipping> <street>westchester park dr</street> <city>college park</city> <state>MD</state> <zip>21121</zip> </shipping> </address> create XSD that enforces xml as below: zip code has to be 5 digit the first character of zip code always has to start 1-9 state code has to be 2 characters state characters has to be capital letter street, city, state and zip has maintain sequence

  • Database Schemas: Please draw the schemas like the example and not just list the entities and attributes! Thanks in adva...

    Database Schemas: Please draw the schemas like the example and not just list the entities and attributes! Thanks in advance! Convert the E-R diagrams to relational schema and show Primary Keys (using underline) Foreign Keys (using dotted underline) .Referential Integrity Your schema should look similar to the example below: CUSTOMER CustName ORDER OrderDate dob admitdate D,C gradstudent advisor major mimor class person phone D,C home homeid street buyer city ssn state ssn address zip nobedrms spousename profession spouseprofess minprice bdrms...

  • This project will allow you to write a program to get more practice with the stack...

    This project will allow you to write a program to get more practice with the stack and queue data structures, as well as more practice with object-oriented ideas that we explored in the previous projects. In this assignment you will be writing a simulation of an order-fulfillment system for a company like Amazon.com. These companies take orders for products and ship them to customers based on what they have in inventory. For this assignment you will be performing a scaled-back...

  • This is a C++ program Instructions Design a class named PersonData with the following member variables...

    This is a C++ program Instructions Design a class named PersonData with the following member variables declared as strings: lastName firstName address city state zip phone Create 3 constructors; a default constructor, a constructor that accepts the first and last name member variables, and a constructor that accepts all member variables. Write the appropriate accessor/getter and mutator/setter functions for these member variables. Create a method within this class called getFullName() that returns the person's first and last names as a...

  • 23. What is the total net amount of capital gain reported on Form 1040? OA. $308...

    23. What is the total net amount of capital gain reported on Form 1040? OA. $308 OB. $2,411 C. $2,719 OD. $2,900 Advanced Scenario 7: Mark and Barbara Matthews Directions Using the tax software, complete the tax return, including Form 1040 and all appropri- ate forms, schedules, or worksheets. Answer the questions following the scenario. Note: When entering Social Security numbers (SSNs) or Employer Identification Numbers (EINS), replace the Xs as directed, or with any four digits of your choice....

  • Super stuck on a couple of questions on this scenario. Advanced Scenario 7: Mark and Barbara...

    Super stuck on a couple of questions on this scenario. Advanced Scenario 7: Mark and Barbara Matthews Directions Using the tax software, complete the tax retum, including Form 1040 and all appropri- ate forms, schedules, or worksheets. Answer the questions following the scenario. Note: When entering Social Security numbers (SSNS) or Employer identification Numbers (EINS), replace the Xs as directed, or with any four digits of your choice. Interview Notes • Mark and Barbara are married and want to file...

  • The Language Is SQL The language is SQL 13- List full details of agents with first...

    The Language Is SQL The language is SQL 13- List full details of agents with first names having exactly three or four letters sorted by the state attribute. 14- List the first name, the last name, the address, the city, the state, the branch number, and the email of agents working in the branch 8005 and having email addresses from yahoo.com. 15-List the first name, the last name, the address, the city, the state, the branch number, and the email...

  • In Python! Search Exercise 11.A: Mergesort with a Comparator CS 1410 Background The sort algorithms we...

    In Python! Search Exercise 11.A: Mergesort with a Comparator CS 1410 Background The sort algorithms we have looked at in Module 8 have all sorted list elements in ascending because it compares elements with the less-than operator. For example, in our mergesort program, the comparison appears as follows: 18 L[1] R01 The effect of this comparison is that if L(i) is less than RC), then L[is considered to come before R[i] in the sorted result. Hence the ascending order of...

  • data files: customer INSERT INTO CUSTOMER_TABLE VALUES ( 1,'Contemporary Furnitures','1355 S. Twilight Blvd.','Gainesville','FL','32601-2871' ); INSERT INTO...

    data files: customer INSERT INTO CUSTOMER_TABLE VALUES ( 1,'Contemporary Furnitures','1355 S. Twilight Blvd.','Gainesville','FL','32601-2871' ); INSERT INTO CUSTOMER_TABLE VALUES ( 2,'Budget Furnitures','15145 S.W. 20th St.','Plano','TX','75094-7743' ); INSERT INTO CUSTOMER_TABLE VALUES ( 3,'Home Furnishings','1900 Dillard Ave.','Albany','NY','12209-1125' ); INSERT INTO CUSTOMER_TABLE VALUES ( 4,'Western Furnitures','1925 Beltline Rd.','Carteret','TX','07008-3188' ); INSERT INTO CUSTOMER_TABLE VALUES ( 5,'Impressionable Furnitures','5585 Westcott Ct.','San Jose','CA','94206-4056' ); INSERT INTO CUSTOMER_TABLE VALUES ( 6,'Furniture Galleria','325 Flatiron Dr.','Boulder','CO','80514-4432' ); INSERT INTO CUSTOMER_TABLE VALUES ( 7,'Perigold Furnitures','394 Arrow Dr.','Seattle','WA','97954-5589' ); INSERT INTO CUSTOMER_TABLE VALUES...

  • Please carefully look at the instructions and asnswe it. i have also attached the 2019 1040...

    Please carefully look at the instructions and asnswe it. i have also attached the 2019 1040 Form and Schedule 1. Please show your work on the tax return form as well. Thank you so much in advance Use 2020 Tax Rates Schedules That is all the information i have Required information [The following information applies to the questions displayed below.) Marc and Michelle are married and earned salaries this year of $64,000 and $12,000, respectively. In addition to their salaries,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT