开发者

xml "reusable" code

Is it possible to make a reusable xml code with some javascript inside? like an impor开发者_JS百科t or include. My problem is that I need to write different xml files and are almost all the same, what change is just some properties. Any best practice? Thanks Pietro


If you know any Java you could use Groovy, a Domain Specific Language on top of Java which has some very fancy XML creating/parsing features. This would allow you to read your list of properties directly from a file.

http://groovy.codehaus.org/Processing+XML


Can you elaborate what you mean by change in properties? A best practice that you are looking for might be to run the xml through an xslt processor to change the value of the properties. Is this feasible in your situation?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜