This commit is contained in:
2025-06-03 00:16:16 +05:00
parent 56a554b500
commit fa10c8abbc
6 changed files with 151 additions and 139 deletions

21
main1.py Normal file
View File

@@ -0,0 +1,21 @@
import xml.etree.ElementTree as ET
from bs4 import BeautifulSoup
def open_file(file_path):
with open(file_path, 'r') as f:
data = f.read()
Bs_data = BeautifulSoup(data, "xml")
b_unique = Bs_data.find_all('unique')
print(b_unique)
b_name = Bs_data.find('child', {'name':'Frank'})
print(b_name)
value = b_name.get('test')
print(value)
open_file("C:/Users/jze9/Documents/work/git/kadastr12/test/MapPlanTerritory_E2DF5B75-E136-48DA-BB4C-8887BA4ABF46.xml")