I have understood the abbrevation of DOM,but i am not understanding what is use of that in salesforce. Is there any link between xml and DOM.

1 Answer 1


The DOM (DOM (Document Object Model) is just a model of the document. It could be a HTML/XHTML documents or XML document. The DOM only describes a structure of objects and it representation and accessibility.

In relation to Salesforce you have some ways where you can "use" DOM in Apex programming language and on the Visualforce pages.

In Apex the use of DOM is useful while creating or reading XML-documents. For that Apex language offers some classes:

Good XML and Apex examples could be found here: Reading and Writing XML Using the DOM

Other use case of the DOM in Salesforce is a Visualforce Page. It is like any other HTML page but processed all dynamic content on the server. When the page is loaded (rendered) completely - you can access page elements guided by DOM. For example manipulate the visibility, look & appearance with Javascript and CSS. For that you must have a strong understanding and knowledge of HTML, Javascript and CSS.

Some helpful topics:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .