Skip to main content

DOM


What is the DOM?

"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."

The W3C DOM provides a standard set of objects for representing HTML and XML documents, and a standard interface for accessing and manipulating them.

The DOM is separated into different parts (Core, XML, and HTML) and different levels (DOM Level 1/2/3):

Core DOM - defines a standard set of objects for any structured document
XML DOM - defines a standard set of objects for XML documents
HTML DOM - defines a standard set of objects for HTML documents
You can read more about the W3C DOM specifications

What is the XML DOM?

The XML DOM is the Document Object Model for XML
The XML DOM is platform and language independent
The XML DOM defines a standard set of objects for XML, and a standard way to access and manipulate XML documents
The XML DOM is a W3C standard
The XML DOM views XML documents as a tree structure of elements embedded within other elements. All elements, their containing text and their attributes, can be accessed through the DOM tree. Their contents can be modified or deleted, and new elements can be created by the DOM. The elements, their text, and their attributes are all known as nodes.

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()