Hello, I want to write a java code to read the input XML file and generate its equivalent Java code.
enter code here
<CodeMarkers classname="CodeGenerator" access="public">
<MethodMarker javadoc="Compares two strings" name="stringComparator" access="private" static="no" return="boolean">
<Input name="str1" notnull="true"/>
<Input name="str2" notnull="false"/>
<MethodVariable name="success" type="boolean" initvalue="false"/>
<JavaCode>
<![CDATA[
System.out.println("Executing comparator");
if (str1.equals(str2)) success = BOOLEAN.TRUE;
return success;
]]>
</JavaCode>
</MethodMarker>
<MethodMarker javadoc="Database look for an employee id" name="getEmployeeId" access="public" static="yes" return="int">
<Input name="employeeName" notnull="true"/>
<MethodVariable name="empId" type="int"/>
<DBInit>
<SQLCode>
<![CDATA[
empId = SELECT emp_id FROM test.employee where emp_id = empId;
return empId;
]]>
</SQLCode>
</DBInit>
</MethodMarker>
I need to write a java code to convert the above XML code into a java code
ie
The first line of output java code should be public class CodeGenerator{}
enter code here
<![CDATA[
empId = SELECT emp_id FROM test.employee where emp_id = empId;
return empId;
]]>
Im not able to put the Lines under CDATA should be used as is in the method
Thanks Athreya