Revision 8680 trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/protocols/Z3950Connection.java

View differences:

Z3950Connection.java
44 44
 *
45 45
 * $Id$
46 46
 * $Log$
47
 * Revision 1.3  2006-10-02 08:29:07  jorpiell
47
 * Revision 1.4  2006-11-13 07:52:58  jorpiell
48
 * Se han incluido los cambios que se hicieron para Chile: cambio de la librer?a jzKit, carga de ArcIms y WCS
49
 *
50
 * Revision 1.3  2006/10/02 08:29:07  jorpiell
48 51
 * Modificados los cambios del Branch 10 al head
49 52
 *
50 53
 * Revision 1.1.2.3  2006/10/02 07:13:43  jorpiell
......
195 198
		  for (int i=0 ; i<fragment.length ; i++){
196 199
			  try {
197 200
				  String answer = "";
201
				  
198 202
				  if (fragment[i] instanceof XMLRecord){
199
					  XMLRecord xml = (XMLRecord)fragment[i];				 	 
200
					  answer = Strings.replace(xml.toString(),
201
							  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
202
					  "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
203
				  	 
204
					  XMLRecord xml = (XMLRecord)fragment[i];	
205
					  answer = xml.toString();
203 206
				  }else {
204 207
					  SUTRS sutr = (SUTRS)fragment[i];
205
					  answer = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" +
208
					  answer = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
206 209
					  "<" + XMLNode.ISNOTXML + ">" + 
207 210
					  sutr.toString() + 
208 211
					  "</" + XMLNode.ISNOTXML + ">";
209
				  }
212
				  }  
210 213
				  
211
				  InputStream buffer = new ByteArrayInputStream(answer.getBytes());
212
				  nodes[i + 1] = XMLTree.xmlToTree(buffer);
214
				  nodes[i + 1] = XMLTree.xmlToTree(answer);
213 215
			  } catch (Exception e1) {
214 216
				  // TODO Auto-generated catch block
215 217
				  e1.printStackTrace();

Also available in: Unified diff