[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Handling XML & XSLT in Java

Asked by _TAD_ in Java Programming Language

Tags: Java, XML, XSLT

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></XML>";

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>Business Name</BusinessUnit><PrimaryKey>12345</PrimaryKey></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.
 
Loading Advertisement...
 
[+][-]11/05/09 11:47 AM, ID: 25753156Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/05/09 12:01 PM, ID: 25753309Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/05/09 12:01 PM, ID: 25753313Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/05/09 01:11 PM, ID: 25754087Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/05/09 02:11 PM, ID: 25754617Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/05/09 08:23 PM, ID: 25756603Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/05/09 08:30 PM, ID: 25756622Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 12:29 AM, ID: 25757519Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 08:31 PM, ID: 25764994Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 08:50 PM, ID: 25765031Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625