Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

XMLѹËõ´«Êä - PowerBuilder / Web Ó¦ÓÃ

¹¦ÄÜ˵Ã÷:Java servlet °ÑXMLÊý¾ÝѹËõºó·¢Ë͵½PBÓû§¶Ë,PBÊÕµ½Êý¾Ýºó½âѹ³öÀ´.

´«ÊäÒª¾­¹ýBase64±àÂë.

ÎÊÌâÊÇ:ÄÜÊÕµ½Êý¾Ýµ«Êǽâѹ²»³öÀ´.ÏëÇë½Ì´ó¼Ò»òÕßÓÐʲôºÃµÄ°ì·¨?

PB¿ÉÒÔÓÃ"zlibwapi.DLL" ½âѹ

////////////////////////////// 

Java CODE:

//ѹËõÊý¾Ý
if(strXML !=null){
byte[] byte_XMLData=null;

StringZip strZip =new StringZip();
byte_XMLData =StringZip.ZipString(strXML.toString());

String encode = Base64.getEncodedText(byte_XMLData);  

//Êä³öÊý¾Ý
PrintWriter outputWriter =null;
try {
outputWriter = res.getWriter();
} catch (IOException e) {
e.printStackTrace();
}
outputWriter.println(encode.toString());
outputWriter.close();
}

package org.peng.util;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;

public class StringZip{
/**
* ѹËõ×Ö·û´®Îª byte[]
* ±£´æΪ×Ö·û´®
*
* @param str ѹËõÇ°µÄÎı¾
* @return
*/
public static final byte[] ZipString(String str) {
if(str == null)
return null;

byte[] compressed;
ByteArrayOutputStream out = null;
ZipOutputStream zout = null;
try {


Ïà¹ØÎÊ´ð£º

ÈçºÎÌá½»xmlÀàÐÍÊý¾Ý - .NET¼¼Êõ / ASP.NET

Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
  <a>aaa
  </a>
  <b>bbb
  </b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......

C# DataSetµ¼³öxml Åú´¦Àí(Ñ­»·)µÃÔõô´¦Àí

DataSetµ¼³öxml Åú´¦Àí(Ñ­»·)µÃÔõô´¦Àí
XMLÎļþ
<A>
      <B>
        <C>
        </C>
  &nb ......

¸ù¾Ý½ÚµãÃû³ÆÑ­»·É¾³ýxml½Úµã.txt - .NET¼¼Êõ / C#

ÄÚÈÝÈçÌâ¡£¡£ÔÚC#Àï¸ÄÈçºÎдÄØ£¿
±¾À´Ë¼Â·ÊÇÏȱȶԽڵãÃû³Æ£¬ÈçÊǵĻ°¾Í±£´æҪɾ³ý½ÚµãµÄϱê·ÅÔÚÊý×éÀȻºóÑ­»·É¾³ý£¬µ«·¢ÏÖ¡£¡£µ±ÎÒɾ³ýµÚÒ»¸öºó£¬ËùÓнڵãϱêÊýÁ¿¶¼·¢Éú¸Ä±ä¡£¡£
¾Í²»ÄÜÔÙ°´ÕÕ֮ǰ¼Í¼µÄ½Úµã ......

ÎÊһϠlinq to xmlµÄ¼òµ¥ÎÊÌâ - .NET¼¼Êõ / ASP.NET

<UserModel xmlns="http://tempuri.org/">
  <Name>Liu</Name>
  <Age>23</Age>
</UserModel>
ÔõôÓÃlinq to xml ²éѯ°ÑÉÏÃæµÄÒ»¸ö×Ö·û´® ͶӰ³ÉÒ»¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ