Các bạn thân mến chào buổi chiều. Vấn đề của tôi có thể là điều này rất cơ bản, tức là làm thế nào chúng ta có thể loại bỏ phần tử gốc từ một tệp xml bằng cách sử dụng xslt. Ví dụ về tệp Xml được đưa ra dưới đây.Cách xóa phần tử gốc khỏi tập tin xml
<Result>
<Jobs id="1">
<Job ID="000000" PositionID="0000">
<Title>Development Manager - Investment Banking - Equities Business</Title>
<Summary><![CDATA[An experienced Development Manager with previous experience leading a small to mid-size team of developers in a Java/J2EE environment. A hands on role, you will be expected to manage and mentor a team of developers working on a mix of greenfield and maintenance projects.   My client, a well known investment bank, requires an experienced Development Manager to join their core technology team. This t]]></Summary>
<DateActive Date="2009-10-06T19:36:43-05:00">10/6/2009</DateActive>
<DateExpires Date="2009-11-05T20:11:34-05:00">11/5/2009</DateExpires>
<DateUpdated Date="2009-10-06 20:12:00">10/6/2009</DateUpdated>
<CompanyName>ABC Technology</CompanyName>
</Job>
</Jobs>
</Result>
Vì vậy, tôi muốn đầu ra như sau
<Jobs>
<Job ID="000000" PositionID="0000">
<Title>Development Manager - Investment Banking - Equities Business</Title>
<Summary><![CDATA[An experienced Development Manager with previous experience leading a small to mid-size team of developers in a Java/J2EE environment. A hands on role, you will be expected to manage and mentor a team of developers working on a mix of greenfield and maintenance projects.   My client, a well known investment bank, requires an experienced Development Manager to join their core technology team. This t]]></Summary>
<DateActive Date="2009-10-06T19:36:43-05:00">10/6/2009</DateActive>
<DateExpires Date="2009-11-05T20:11:34-05:00">11/5/2009</DateExpires>
<DateUpdated Date="2009-10-06 20:12:00">10/6/2009</DateUpdated>
<CompanyName>ABC Technology</CompanyName>
</Job>
</Jobs>
Vì vậy, Không còn
<Result></Result>
thẻ trong file xml. Xin lỗi. Cứu giúp. Cảm ơn trước.
Bạn có thể định dạng câu hỏi của bạn vì vậy chúng tôi có thể xem những gì nó là bạn đang yêu cầu? có vẻ như bạn cần phải phân loại < – Rippo