I am a lead systems engineer that has been away from heads-down coding for a couple of years now so my recollection is a bit foggy.
I have a coder who is developing in Java and needs to apply an XSL Transform to an XML string before posting the string to a web service. As this coder has never used XML/XSLT before I want to keep this as simple as possible.
For the sake of an example, suppose the coder has:
String xmlText = "<XML><ROW><ORGID>Business
Name</ORGID><ID>12345</ID>
</ROW></XM
L>";
I will have him write an XSLT file that simply changes the names of the fields so that the resultant string is:
String postTransform "<XML><ROW><BusinessUnit>B
usiness Name</BusinessUnit><Primar
yKey>12345
</PrimaryK
ey></ROW><
/XML>";
I remember enough of the XSLT code to be useful, but my background was in C# and C++, not Java -- so I'm at a bit of a loss on the most efficient method for opening and applying the XSLT document to the XML string.
I really just need something quick, dirty and efficient. I would prefer to not have to incorporate the entire XMLDOM architecture to apply a simple transform.