Lấy nội dung của các thẻ trong file xml

Liên hệ QC

rosy84

Thành viên hoạt động
Tham gia
15/3/09
Bài viết
171
Được thích
39
Dear các ban!

Hiện tại mình có nội dung file xml như bên dưới. Giờ mình muốn lấy ra giá trị của các thẻ trong file

nhưng vẫn tuân theo thứ tự có được không? các bạn giúp mình với.

HTML:
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.w3.org/2004/12/ws-chor/cdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2004/12/ws-chor/cdl
C:\Comp_Sci\Project\jaxb\xml\wscdl.xsd" name="libraryChoreography" targetNamespace="http://www.ecs.soton.ac.uk/akd202£">

<!-- Information Types -->
<informationType name="bookProfileType" type="bookProfileMsg"/>
<informationType name="bookAvailableType" type="bookAvailableMsg"/>

<!-- Tokens -->
<token informationType="uriType" name="centralLibraryRef"/>

<!-- TokenLocator -->
<!-- Null -->

<!-- Role Types -->
<roleType name="LibraryRole">
    <behavior name="serviceRequester"/>
    <behavior name="serviceProvider" interface="libraryServiceProviderWSDL"/>
</roleType>
<roleType name="CentralLibraryRole">
    <behavior name="serviceProvider" interface="centralLibraryServiceProvider"/>
</roleType>

<!-- Relationship Types -->
<relationshipType name="Library_CentralLibrary">
    <role type="LibraryRole" behavior="serviceRequester"/>
    <role type="CentralLibraryRole" behavior="serviceProvider"/>
</relationshipType>

<!-- Channel Types -->
<channelType name="CentralLibraryChannel">
    <role type="CentralLibraryRole"/>
    <reference>
        <token name="centralLibraryRef"/>
    </reference>
</channelType>

<!-- Choreographies -->
<choreography name="GetBookAvailability" root="true">
    <relationship type="Library_CentralLibrary"/>
    <variableDefinitions>
        <variable name="bookProfile" informationType="bookProfileType" mutable="false"/>
        <variable name="bookAvailability" informationType="bookAvailableType" mutable="false"/>
        <variable name="centralLibrary" channelType="CentralLibraryChannel"/>
    </variableDefinitions>
    <sequence>
        <interaction channelVariable="centralLibrary" name="getBookAvailability" operation="queryBookAvailabilty" initiate="true">
            <participate toRole="CentralLibraryRole" relationshipType="Library_CentralLibrary" fromRole="LibraryRole"/>
            <exchange action="request" name="bookProfileExchange" informationType="bookProfileType">
                <send variable="cdl:getVariable(bookProfile,LibraryRole)"/>
                <receive variable="cdl:getVariable(bookProfile,CentralLibraryRole)"/>
            </exchange>
            <exchange action="respond" name="bookAvailabilityExchange" informationType="bookAvailableType">
                <send variable="cdl:getVariable(bookAvailability,CentralLibraryRole)"/>
                <receive variable="cdl:getVariable(bookAvailability,LibraryRole)"/>
            </exchange>
        </interaction>
    </sequence>
</choreography>
</package>
 
Web KT
Back
Top Bottom