VOOZH about

URL: https://www.geeksforgeeks.org/node-js/node-js-console-dirxml-method/

⇱ Node.js console.dirxml() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Node.js console.dirxml() Method

Last Updated : 23 Jul, 2025

The console.dirxml() method calls console.log() method by passing the received argument, this element does not produce any XML formatting.

Syntax:

console.dirxml(object_or_element)

Parameters: This function accepts the following parameter:

  • object: This method take a JavaScript object or element.

Return Value: This method returns the object or element passed.

Below examples illustrate the use of process.memoryUsage() method in Node.js.

Example 1: 

Run the index.js file using the following command:

node index.js

Output:

GeeksforGeeks

Example 2: Create an index.js file with the following code.

Run the index.js file using the following command:

node index.js

Output:

Hi there, Geeks

Reference: https://nodejs.org/api/console.html#console_console_dirxml_data

Comment

Explore