ฉันมีไฟล์ข้อความที่ฉันต้องการแยกองค์ประกอบข้อมูลที่เฉพาะเจาะจง
ข้อความตัวอย่าง:
<url>
<loc>https://example.com/example0.html</loc>
<lastmod>2019-01-22</lastmod>
<priority>0.5</priority>
</url>
<url>
<loc>https://example.com/example1.html</loc>
<lastmod>2019-01-21</lastmod>
<priority>0.5</priority>
</url>
<url>
<loc>https://example.com/example2.html</loc>
<lastmod>2019-01-21</lastmod>
<priority>0.5</priority>
</url>
<url>
<loc>https://example.com/example3.html</loc>
<lastmod>2019-01-20</lastmod>
<priority>0.5</priority>
</url>
<url>
<loc>https://example.com/example4.html</loc>
<lastmod>2019-01-20</lastmod>
<priority>0.5</priority>
</url>
ฉันต้องการแยก:
https://example.com/example0.html
https://example.com/example1.html
https://example.com/example2.html
https://example.com/example3.html
https://example.com/example4.html
โปรดทราบว่าวันที่ไม่คงที่
คุณหมายถึงอะไร "สกัด"? คุณต้องการลบทุกอย่างยกเว้น URL หรือไม่
—
Toto