FELIX-1537: fileinstall should support xml syntax for properties file

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@824829 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
index d3fc53c..7e6cb20 100644
--- a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
+++ b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
@@ -18,6 +18,7 @@
  */
 package org.apache.felix.fileinstall.internal;
 
+import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStream;
@@ -68,10 +69,17 @@
     boolean setConfig(File f) throws Exception
     {
         Properties p = new Properties();
-        InputStream in = new FileInputStream(f);
+        InputStream in = new BufferedInputStream(new FileInputStream(f));
         try
         {
-            p.load(in);
+            in.mark(1);
+            boolean isXml = in.read() == '<';
+            in.reset();
+            if (isXml) {
+                p.loadFromXML(in);
+            } else {
+                p.load(in);
+            }
         }
         finally
         {