Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Text;

public class Main {
    public static Element writeFloatElement(Document document, String name, float value, Element parentElement) {
        Element element = document.createElement(name);
        Text text = document.createTextNode(Float.toString(value));
        element.appendChild(text);
        parentElement.appendChild(element);
        return element;
    }
}