Skip to main content

xml tutorial

What is XML?

XML (eXtensible Markup Language) is a meta-language; that is, it is a language in which other languages are created. In XML, data is "marked up" with tags, similar to HTML tags. In fact, the latest version of HTML, called XHTML, is an XML-based language, which means that XHTML follows the syntax rules of XML.
XML is used to store data or information. This data might be intended to be by read by people or by machines. It can be highly structured data such as data typically stored in databases or spreadsheets, or loosely structured data, such as data stored in letters or manuals.
XML Benefits

Initially XML received a lot of excitement, which has now died down some. This isn't because XML is not as useful, but rather because it doesn't provide the Wow! factor that other technologies, such as HTML do. When you write an HTML document, you see a nicely formatted page in a browser - instant gratification. When you write an XML document, you see an XML document - not so exciting. However, with a little more effort, you can make that XML document sing!
This section discusses some of the major benefits of XML.
Code Sample: XMLBasics/Demos/Paul.xml

<?xml version="1.0"?>
<person>
 <name>
  <firstname>raju</firstname>
  <lastname>kumar</lastname>
 </name>
 <job>software</job>
 <gender>Male</gender>
</person>

Popular posts from this blog

insert document in collection mongodb

 Insert document in collection Two types of insert Insert single records:  Insert multiple records Insert single records:    syntax:  db.collection.insertOne(    <document>,    {       writeConcern: <document>    } ) Example 1:  db.users.insertOne({"name":"ram","email":"ram@gmail.com"})  Example 2:  db.users.insertOne( [{"employee":{"name":"ram","email":"ram@gmail.com"}}] ) Insert multiple records:   syntax : db.Collection_name.insertMany( [<document 1>, <document 2>, …], {     writeConcern: <document>,     ordered: <boolean> }) Example:  db.users.insertMany([{"name":"ram","email":"ram@gmail.com"},{"name":"raju","email":"raju@gmail.com"}])

Collection Shell Commands in MongoDB

Create Collection  Syntax: db.createCollection("Collection Name"); Example: db.createCollection("users"); Delete collection in Mongodb Shell Command db.collection.drop()  Find Collection in Mongodb Shell Command db.collection.find() Show all Collection in Mongodb Shell Command show collections Creat Collection in Mongodb Shell Command db.createCollection("users") Rename the Collection In Mongodb Shell Command db.collection.renameCollection()   Update the single document in MongoDB collections Shell Command db.collection.updateOne()  Updates all the documents in MongoDB collections that match the given query.  db.collection.updateMany() Replaces the first matching document in MongoDB collection db.collection.replaceOne()  Deletes the first document in Mongodb collection db.collection.deleteOne()  db.collection.deleteMany()