We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21731
    • 1 Posts
    I have been trying to figure out the support of xml/xslt and soap in CMS but couldn’t find much besides low layer support by php itself.

    This is my requirement:

    1. The end user submits form data through web browser;
    2. My server side program validates the form data;
    3. converts the form data to XML;
    4. transform the XML using XSLT file read from a database;
    5. package the output XML into SOAP message and send to the SOAP server;
    6. when getting the response, the data has to pass the same process in reverse order.

    As far as I know, I have to implement my requirements in the following steps:

    for step 3, I have to create a XML DOM processor, convert my form data into XML, one element at a time, and write it to a file;

    for step 4, I need to
    * read the file and
    * parse it to a DOM object (I may not need to manually do this but XML string has to be parsed anyways, so from performance perspective they are the same)
    * run XSLT
    * render the output to a string

    for step 5, I need to
    * take the output string from step 4
    * parse it
    * assign the XML nodes to php variables
    * call php SOAP to send the message.

    The above sounds like a lot of redundant steps which will cause performance problem. Is there a way in php to neatly handle xslt/soap or I have to switch to Java? Is there any CMS that provides module/plugin with xslt/soap features? (Besides, some of the SOAP-php packages seem outdated)

    This probably sounds a question not specific for Modx but I’ve been reading multiple forums and been impressed by the technical knowledge people have in this forum.

    Thanks in advance!