It sounds like you try to update the XML file (application configuration) during your product installation. If that's the case, you should take a look at XmlConfig element.
It has a number of advantages compared to custom action:
- it is a part of WiX toolset and hence was thoroughly tested
- its only purpose is to modify the XML
- it's a matter of several lines of WiX code
So, don't invent the wheel and keep to the standard solutions as much as possible.