Writing XML

Adam D. Ruppe destructionator at gmail.com
Sun Feb 6 15:27:33 PST 2011


On Mon, Feb 07, 2011 at 12:23:45AM +0100, spir wrote:
> >How do you write a tag named "tight"? Or a tag calculated at runtime?
> 
> Call opDispatch directly ;-)

You can't call opDispatch with a runtime string; it needs to be a template
parameter.

The way I do it is:

string createNode(string name) { implementation... }

string opDispatch(string name)() { return createNode(name); }


Then, if you want to use random strings or runtime data, you just call createNode itself.



More information about the Digitalmars-d mailing list