Bonjour,

Jakarta Commons Configuration.

Un fichier properties classiques permet-il de lire une série de caractères d'objets de même type ?

Avec un fichier properties XML je ne l'ai pas fait, mais je pense que c'est possible.

Donc avec ce genre de paramètres je suis presque obligé d'utiliser un fichier XML ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE DownloadParams [
 <!ELEMENT DownloadParams (symbol*)>
 <!ELEMENT symbol (symbolName,secType,exchange,currency)>
  <!ELEMENT symbolName (#PCDATA)>
  <!ELEMENT secType (#PCDATA)>
  <!ELEMENT exchange (#PCDATA)>
  <!ELEMENT currency (#PCDATA)>
]>
 
<DownloadParams>
	<symbol>
		<symbolName>MSFT</symbolName>
		<secType>STK</secType>
		<exchange>SMART</exchange>
		<currency>USD</currency>
	</symbol>
	<symbol>
		<symbolName>INTL</symbolName>
		<secType>STK</secType>
		<exchange>SMART</exchange>
		<currency>USD</currency>
	</symbol>
	<symbol>
		<symbolName>YAHO</symbolName>
		<secType>STK</secType>
		<exchange>SMART</exchange>
		<currency>USD</currency>
	</symbol>
</DownloadParams>