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

xml/propertiesÎļþµÄÏ໥±£´æ×ª»¯

/*
Á·Ï°Ê¹ÓÃjava.util.propertiesÀà°üÀ´²Ù×÷propertes¼°XMLÎļþ,ͨ¹ýstore·½·¨µÄµ÷ÓÿÉʵÏÖxml/propertiesÎļþµÄÏ໥±£´æ×ª»¯
*/
import java.util.*;
import java.io.*;
public class TestPropertes
{
public static void main(String[] args) {
   Properties pp = new Properties();
   FileInputStream in = null;
   FileInputStream xmlin = null;
   FileOutputStream out = null;
   PrintStream ps=null;
   FileOutputStream xmlout =null;
   try{
          in = new FileInputStream("c:/Test.Properties");
   }catch(FileNotFoundException e)
   {
    System.out.println("propertiesÎļþûÓÐÕÒµ½");
   }
   try
   {
   pp.load(in);
   }catch(IOException e)
   {
    System.out.println(e+"µ÷ÓÃload·½·¨Ê±³öÏÖÒì³£");
   }
   System.out.println(pp.getProperty("log4j.rootLogger"));
   System.out.println(pp.getProperty("log4j.appender.A"));
   System.out.println(pp.getProperty("log4j.appender.A1.layout"));
   try
   {
    ps = new PrintStream("c:/TestMemo.txt");
    out = new FileOutputStream("c:/Test.Properties");
   }catch(IOException e1)
   {
    System.out.println(e1+"PrintStream creat Error");
   }
   pp.list(ps); //½«propertiesÎļþÓÃlist·½·¨¶ÁÈ¡²¢´æÈëpsÎļþÖÐ
  
   //¸ü¸Ä¼üÖµ
   Object o =pp.setProperty("log4j.rootLogger","DEBUG,B"); //¸ü¸Ä¶ÔÓ¦µÄHASHTABLEÖеÄÖµ£¬Êµ¼ÊÉÏÎļþÖеÄֵû±ä»¯
   System.out.println(pp.getProperty("log4j.rootLogger"));
   pp.list(ps); //½«¼üÖµ¸ü¸ÄºóµÄpropertiesÎļþÓÃlist·½·¨¶ÁÈ¡²¢´æÈëpsÎļþÖÐ.list»á×Ô¶¯ÒÔ×·»ØµÄ·½Ê½´ÓÔ­ÎļþβдÈë
   System.out.println(o.getClass());
   try
   {
 &nbs


Ïà¹ØÎĵµ£º

InstallshieldÐÞ¸ÄXMLÎļþ

ʹÓÃXML changeÐÞ¸ÄxmlÎļþµÄ»ù±¾²½Öè
(½öÏÞÓÚInstallscript MSIÏîÄ¿ÒÔ¼°Basic MSIÏîÄ¿)
1.µ¼ÈëXMLÎļþ¡£ÔÚSystem ConfigurationÊÔͼÖÐÑ¡ÔñXML File Changes£¬ÓÒ¼üXML
File¡£Ñ¡ÔñImport£¬¿ÉÒÔÆô¶¯Import XML
wizard¡£NextÖ®ºó£¬Ñ¡ÔñÐèÒªµ¼ÈëµÄXMLÎļþ£¨¿ÉÒÔÔÚÏÂÀ­¿òÖÐÑ¡ÔñÀàÐÍ£©¡£NextÖ®ºó£¬Select
ALL¡£Èç¹ûÑ¡Ôñ²¿·Ö£ ......

ËÄÑÛ¿´ÊÀ½ç XMLÓï·¨


XML (EXtensible Markup Language)
XML is a
cross-platform, software and hardware independent tool for transmitting
information.
Prolog
XML
Declaration
Processing
Instructions
DOCTYPE
Declaration
Elements
Attributes
XML
Comments
CDATA
Sections
Character
and Entity Refere ......

gloox xmlµÄ½âÎöÄ£¿é

gloox×Ô¼ºÊµÏÖÁËxmlµÄ½âÎöÄ£¿é£¬Ã»ÓÐÓõ½µÚÈý·½µÄ¿â(tinyXML£¬expat )
Ö÷񻃾¼°µÄÎļþ:
tag.h (tag.cpp)
taghandler.h
parser.h (parser.cpp)
1. TagÒ»¸öTag¾ÍÊÇÒ»¸öXMLÔªËØ
ÀýÈç:
a.
<book kind='computer'>
<store id='23'/>
<author>
    qiang
</author>
</bo ......

XML(È«£©

XML£¨Extensible Markup Language£©¼´¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ£¬ËüÓëHTMLÒ»Ñù£¬¶¼ÊÇSGML(Standard Generalized Markup Language,±ê׼ͨÓñê¼ÇÓïÑÔ)¡£XmlÊÇInternet»·¾³ÖÐ¿çÆ½Ì¨µÄ£¬ÒÀÀµÓÚÄÚÈݵļ¼Êõ£¬Êǵ±Ç°´¦Àí½á¹¹»¯ÎĵµÐÅÏ¢µÄÓÐÁ¦¹¤¾ß¡£À©Õ¹±ê¼ÇÓïÑÔXMLÊÇÒ»ÖÖ¼òµ¥µÄÊý¾Ý´æ´¢ÓïÑÔ£¬Ê¹ÓÃһϵÁмòµ¥µÄ±ê¼ÇÃèÊöÊý¾Ý£¬¶øÕâЩ±ê¼Ç¿ÉÒÔÓà ......

XMLµÄ¼òµ¥¶ÁÈ¡ÓëдÈë

ÒÑÖªÓÐÒ»¸öXMLÎļþ£¨bookstore.xml£©ÈçÏ£º
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
</booksto ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ