git-svn-id: svn://anubis/gvsu@289 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-11-29 18:16:21 +00:00
parent 029d7eb3e2
commit d391455acb

View File

@ -19,16 +19,19 @@ public class User extends RegistrationInfo
DomRepresentation rep = new DomRepresentation(MediaType.TEXT_XML); DomRepresentation rep = new DomRepresentation(MediaType.TEXT_XML);
Document d = rep.getDocument(); Document d = rep.getDocument();
Element eltRoot = d.createElement("user"); fillNodes(d, null);
d.appendChild(eltRoot);
fillNodes(d, eltRoot);
return rep; return rep;
} }
public void fillNodes(Document d, Element eltRoot) public void fillNodes(Document d, Element eltParent)
{ {
Element eltRoot = d.createElement("user");
if (eltParent == null)
d.appendChild(eltRoot);
else
eltRoot.appendChild(eltRoot);
Element eltName = d.createElement("name"); Element eltName = d.createElement("name");
eltName.appendChild(d.createTextNode(getUserName())); eltName.appendChild(d.createTextNode(getUserName()));
eltRoot.appendChild(eltName); eltRoot.appendChild(eltName);