I'm new to XML and need to create a web app needs to do the following:
1. Read a couple of parameters (username and password) from the request
2. Dynamically create some xml code with those params
3. Send the xml code to another web service for validation
I am struggling with steps 2 and 3. Have been reading a lot on XML and SAX but the possible solutions I'm looking at seem really heavy. Is there a simple / straightforward way of doing what I need? Any code samples/snippets would be much appreciated.
Author and all-around good cowpoke
posted 5 years ago
The simplest thing to do is just treat this as a problem in generating text and ignore the XML APIs.
If you can create/edit a text file that is a legal XML document containing example data, use that as a template and fill in the changing values at runtime.
I did this as a quick fix for a customer, so very very much simpler and faster than creating a DOM in memory and serializing it.