Element element = document.createElement("item"); element.setTextContent("This is the text content of the element");In this example, we create a new element called "item" using the `createElement()` method. We then set the text content of the element to "This is the text content of the element" using the `setTextContent()` method. Package/Library: The Element class is part of the javax.xml package.