Revision 5868 trunk/libraries/libInternationalization/src-utils/org/gvsig/i18n/utils/ConfigOptions.java
ConfigOptions.java | ||
---|---|---|
4 | 4 |
import java.io.FileNotFoundException; |
5 | 5 |
import java.io.IOException; |
6 | 6 |
import java.util.ArrayList; |
7 |
import java.util.HashMap; |
|
7 | 8 |
|
8 | 9 |
import org.kxml2.io.KXmlParser; |
9 | 10 |
import org.xmlpull.v1.XmlPullParserException; |
... | ... | |
140 | 141 |
private void parseProjects(KXmlParser parser) throws XmlPullParserException, IOException { |
141 | 142 |
// recorremos todos los proyectos dentro de 'projects' |
142 | 143 |
int state; |
143 |
String dir; |
|
144 |
String dir, basename; |
|
145 |
String project[] = new String[2]; |
|
144 | 146 |
|
145 | 147 |
for (state = parser.next(); state!=KXmlParser.END_TAG || !parser.getName().equals("projects") ; state=parser.next()) { |
146 | 148 |
if (state==KXmlParser.START_TAG) { |
147 | 149 |
if (parser.getName().equals("project")) { |
148 | 150 |
if (parser.getAttributeValue(null, "dir")!=null) { |
149 | 151 |
dir = parser.getAttributeValue(null, "dir"); |
150 |
if (dir!=null) |
|
151 |
projects.add(dir); |
|
152 |
if (dir!=null) { |
|
153 |
project[0] = dir; |
|
154 |
project[1] = parser.getAttributeValue(null, "basename"); |
|
155 |
if (project[1]==null) |
|
156 |
project[1] = defaultBaseName; |
|
157 |
projects.add(project); |
|
158 |
} |
|
152 | 159 |
else |
153 | 160 |
System.err.println("Error leyendo el fichero de configuraci?n. No se encontr? el atributo 'dir'\nrequerido en la etiqueta <project>. La etiqueta ser? ignorada."); |
154 | 161 |
} |
Also available in: Unified diff