Sun's XML Classes

Rob Williams (rob@robco-inc.com)
Sun, 29 Nov 1998 08:51:18 -0800


I downloaded the Early Access of the Sun classes and they work ok, so far
for what I've wanted to do with them. My question is, has anyone else found
that you end up writing a lot of ugly code to get simple things done? Maybe
I'm missing something? Here's an excerpt:

billTo.appendChild(btCoName);
billTo.appendChild(new TextNode("\n"));
btCoName.appendChild(doc.createTextNode(btCoNameFld.toString()));
billTo.appendChild(btAdd1);
billTo.appendChild(new TextNode("\n"));
btAdd1.appendChild(doc.createTextNode(btAdd1Fld.toString()));
billTo.appendChild(btAdd2);
billTo.appendChild(new TextNode("\n"));
btAdd2.appendChild(doc.createTextNode(btAdd2Fld.toString()));
billTo.appendChild(btCity);
billTo.appendChild(new TextNode("\n"));
btCity.appendChild(doc.createTextNode(btCityFld.toString()));
billTo.appendChild(btState);
billTo.appendChild(new TextNode("\n"));
btState.appendChild(doc.createTextNode(btStateFld.toString()));
billTo.appendChild(btZip);
billTo.appendChild(new TextNode("\n"));
btZip.appendChild(doc.createTextNode(btZipFld.toString()));
billTo.appendChild(new TextNode("\n"));

Rob Williams
RobCo Incorporated