I am wanting to create an xml doc that looks like this but I don’t know how to:
<bo type="Employee" id="0000012f41bce2a865f8616b0010007c0008008b">
<username>marv</username>
</bo>
this is what I have so far, I’m really just confused as how to add the username element:
Element bo = testDoc.createElement("bo");
bo.setAttribute("type", "Employee");
bo.setAttribute("id", emp.getId());
1 Answer