XMLµÚ¶þ¿Î
wsdl.xmlÎļþ
<?xml version="1.0" encoding="UTF-8" ?>
<definitions name="MobilePhoneService"
targetNamespace="www.mobilephoneservice.com/MobilePhoneService-interface"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.mobilephoneservice.com/MobilePhoneService"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<portType name="MobilePhoneService_port">
<operation name="getListOfModels ">
.......
.......
</operation>
<operation name="getPrice">
.......
.......
</operation>
</portType>
</definitions>
typical_noCDATA.xmlÎļþ
<?xml version="1.0" encoding="gb2312"?>
<bookstore name="Î÷µ¥Í¼Êé´óÏÃ">
<book author="ÂíÊ¿±ø">
<!-- ÎÒ´ÓÀ´Ã»Ð´¹ýÕâ±¾Êé -->
<name>ÈçºÎÔÚÂóµ±ÀͰ׳԰׺È</name>
<description>ÕÒ¸öÈËÌæÄ㸶ÕÊ</description>
&n
Ïà¹ØÎĵµ£º
ÈçºÎ¼ÓÔØÓÐÍâ¹úºÍÌØÊâ×Ö·ûµÄÎĵµ£¿
¡¡¡¡Îĵµ¿ÉÒÔ°üº¬Íâ¹ú×Ö·û£¬ÀýÈ磺
¡¡¡¡foreign characters (úóí?)
¡¡¡¡ÀýÈç íá µÄÍâ¹ú×Ö·û±ØÐëÔÚÇ°Ãæ¼ÓÉÏ escape ÐòÁС£Íâ¹ú×Ö·û¿ÉÒÔÊÇ UTF-8 ±àÂë»òÓò»Í¬±àÂëÖ¸¶¨£¬ÈçÏÂËùʾ£º
¡¡¡¡foreign characters (íá)
¡¡¡ ......
ÔÚ XML ¶ÔÏóÄ£ÐÍÖÐÈçºÎ´¦Àí¿Õ°××Ö·û£¿
¡¡¡¡ÓÐЩʱºò£¬XML ¶ÔÏóÄ£Ðͽ«ÏÔʾ°üº¬¿Õ°××Ö·ûµÄ TEXT ½Úµã¡£¿Õ°××Ö·û±»½Ø¶Ïºó£¬¶à°ë»á´øÀ´Ò»Ð©»ìÂÒ¡£ÀýÈçÏÂÃæµÄ XML Àý×Ó£º
¡¡¡¡]>
¡¡¡¡Smith
¡¡¡¡John
¡¡¡¡Éú³ÉÏÂÁÐÊ÷£º
¡¡¡¡Processing Instruction: xml
¡¡¡¡DocType: person
¡¡¡¡ELEMENT: person ......
ËÄÖÖXML½âÎö·½·¨
xmlÎļþ£º
£¼?xml version="1.0" encoding="GB2312"?£¾
£¼RESULT£¾
£¼VALUE£¾
£¼NO£¾A1234£¼/NO£¾
£¼ADDR£¾ËÄ´¨Ê¡XXÏØXXÕòXX·X¶ÎXXºÅ£¼/ADDR£¾
£¼/VALUE£¾
£¼VALUE£¾
£¼NO£¾B1234£¼/NO£¾
¡¡ ¡¡£¼ADDR£¾ËÄ´¨Ê¡XXÊÐXXÏçXX´åXX×飼/ADDR£¾
£¼/VALUE£¾
£¼/RESULT£¾
1£©DOM
& ......
/*
Á·Ï°Ê¹ÓÃ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();
Fi ......
½ñÌìµÄÏîÄ¿Ä£¿éÖÐÓõ½¸ù¾ÝÊý¾Ý¿âÀïµÄ×ÊÁÏÉú³ÉxmlÎļþ£¬Ö÷Òª²½ÖèÈçÏ£º
£¨1£© Á¬½ÓÊý¾Ý¿â£¬È¡³öÊý¾Ý£»
£¨2£© ´´½¨½áµã£¬Ìí¼Ó×ÓÏ
£¨3£© дÈëÎļþ“test.xml”ÖУ»
¾ßÌå´úÂëÈçÏ£º
import java.io.FileOutputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Result ......