Question

Name three components to an XML object, and give an XML example indicating where each component...

Name three components to an XML object, and give an XML example indicating where each component lives. Then, convert this XML object to a similar JSON object.

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

XML is a markup language. XML is a markup language mainly consists of tags -- wherein following components are key components :

declarations, elements, comments, character references, and processing instructions, collectively known as the markup.


*XML element* is everything - i.e. including start and end tags
example :
<element></element> == is an empty element
<title>Study</title>


XML:
<human>
<age>42</age>
<name>Rowert</name>
</human>

JSON FORMAT:

myJSON = {"age" : 42,
"name" : "Rowert"}

WHY XML To JSON?
XML is more difficult to parse compared to JSON.
JSON is parsed into JS, which is ready to use.


Add a comment
Know the answer?
Add Answer to:
Name three components to an XML object, and give an XML example indicating where each component...
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
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