What can we do to allow

Hello all,

At this moment, I have an application that consumes an “elements empty XML file” and then we build the elements info and properties using php and we send.

The workflow is more or less like this:
We grab an XML called “infoDomain” then we put the information inside and then we send to the server.

So, the xml on this situation is quite “fixed”,the structure is there, it should be there, and that’s all.

But the issue arrives with the createDomain method.
The create domain cannot have that “fixed” xml structure, because, depending on several factors, the XML of createDomin should change (not much but change).

So my question is:
What can you suggest, in order to allow me to deal with this xnl necessary changes?

For info domain I have:
1 - infoXML FILE “clean”
2 - A infoMethod that interects with the XML file;
3 - A infoMethod that makes the bridge with the front-end.

I would like to keep, more or less the same estruture because, ONLY createDomain is different. :frowning:

I have thought:
Should I create conditionals and build change the XML ?
Should I create an XML file for each of the different details?
For now, the create domain and is different rules, are based uppon the fact that we register a DOMAIN in a way or another, AND/OR the fact that we have two possible domains to deal within this application.

What if, in the future, we want to allow the createtion, not only of .pt a and .com.pt but also .net.pt, etc… etc… Each of those may have their own runes, hence, their one specific XML command.

So, according to this. Sorry I’m to tired to write any better,

Any thoughts, anything just a clue, a little tip, anything, I will be a happy person. :smiley:

Thanks a lot in advance,
Márcio

Sorry for the title, I’ve forget to change it. :frowning:

Here is a shorter and hope, clear version, about what I would like to know.

At the moment we have:
1 XML file - 1 method that deals with XML - 1 method that deals with the form fileds.

This works for almost all XML commands that we need to send to the server. Great.

They is one method however, that’s different.

This method, cannot rely on only one XML, that XML needs to change according to user options.

What is the best way to deal with this situation?

ADD-ON:

The xml files I have, now cover:
infoDomain XML
infoContact XML
checkContact XML
infoContact XML
createContact XML

They all use the 1XML - 1 method that deals with XML - 1 method that deals with the Form fields - “approach”

POSSIBLE SOLUTIONS:
having more then one XML file for this command.

So, instead of having a createDomain XML file, and have it changing according to user options made on the view, we can have like:

createDomainDotOrgDotPt XML
createDomainDotPtWithConditionA XML
createDomainDotPtWithConditionB
.
.
.

Then, we need for each of those XML files, (that are almost similar and that only change a few lines), to have, a method to interact with them…

This seems like a very dummy solution.

I can have, a very simple XML file that contains what ALL different createDomains commands can contain, then, according to the user choice, ADD or EDIT XML ELEMENTS to that XML file.

I can explain better, I just can write it any better. :frowning: