I was wondering if anyone knows if it is possible to do basic string replacement using XSLT even though the strings being replaced may contain "<" and ">". Here is my problem:
I need to be able to convert XML like this:
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.4.2_03" class="java.beans.XMLDecoder"> <object class="javax.swing.JButton"> <string>Hello, world</string> </object> </java>
Into XML like this(notice each "<" is replaced with "<" and each ">" has been replaced with "> and then it was wrapped in a SOAP envelope"):
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmln s:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SubmitRequest xmlns="http://apps.someurl.com/somePath/"> <xmlRequest> <?xml version="1.0" encoding="UTF-8"?> <java version="1.4.2_03" class="java.beans.XMLDecoder"> <object class="javax.swing.JButton"> <string>Hello, world</string> </object> </java> </xmlRequest> </SubmitRequest> </soap:Body> </soap:Envelope>
I know it is possible to do this using just about any programming language, but I want to know if it can be done using XSLT stylesheets. If it is possible does anyone know how? Or could you direct me to a tutorial on how to do this?
Thank you,
--J
I need to be able to convert XML like this:
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.4.2_03" class="java.beans.XMLDecoder"> <object class="javax.swing.JButton"> <string>Hello, world</string> </object> </java>
Into XML like this(notice each "<" is replaced with "<" and each ">" has been replaced with "> and then it was wrapped in a SOAP envelope"):
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmln s:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SubmitRequest xmlns="http://apps.someurl.com/somePath/"> <xmlRequest> <?xml version="1.0" encoding="UTF-8"?> <java version="1.4.2_03" class="java.beans.XMLDecoder"> <object class="javax.swing.JButton"> <string>Hello, world</string> </object> </java> </xmlRequest> </SubmitRequest> </soap:Body> </soap:Envelope>
I know it is possible to do this using just about any programming language, but I want to know if it can be done using XSLT stylesheets. If it is possible does anyone know how? Or could you direct me to a tutorial on how to do this?
Thank you,
--J