package aQute.bnd.connection.settings;

import java.io.File;

import aQute.lib.xpath.XPathParser;

public class SettingsParser extends XPathParser {
	final SettingsDTO settings = new SettingsDTO();

	/*
	 * <proxies> <proxy> <id>example-proxy</id> <active>true</active>
	 * <protocol>http</protocol> <host>proxy.example.com</host>
	 * <port>8080</port> <username>proxyuser</username>
	 * <password>somepassword</password>
	 * <nonProxyHosts>www.google.com|*.example.com</nonProxyHosts> </proxy>
	 * </proxies>
	 */

	public SettingsParser(File file) throws Exception {
		super(file);

		parse("/settings/proxies/proxy", ProxyDTO.class, settings.proxies);
		parse("/settings/servers/server", ServerDTO.class, settings.servers);
	}

	public SettingsDTO getSettings() {
		return settings;
	}
}

@@ -55,16 +55,78 @@
 .File;%0A%0A
+import aQute.bnd.osgi.Macro;%0Aimport aQute.bnd.osgi.Processor;%0A
 import a
@@ -252,16 +252,79 @@
 gsDTO();
+%0A%09private final Macro%09replacer%09= new Processor().getReplacer();
 %0A%0A%09/*%0A%09 
@@ -906,11 +906,107 @@
 ings;%0A%09%7D
+%0A%0A%09@Override%0A%09protected String processValue(String value) %7B%0A%09%09return replacer.process(value);%0A%09%7D
 %0A%7D%0A

Add support for macro replacement in file parsing