<?xml version="1.0" encoding="UTF-8"?><response>
<header>
<resultCode>INFO-00</resultCode>
<resultMsg>NORMAL SERVICE</resultMsg>
</header>
<body>
<items>
<item>
<sgId>20180613</sgId>
<sgTypecode>4</sgTypecode>
<huboid>100000000</huboid>
<sggName>종로구</sggName>
<sdName>서울특별시</sdName>
<wiwName>종로구</wiwName>
<jdName>무소속</jdName>
<name>홍길동</name>
<hanjaName>洪吉童</hanjaName>
</item>
</items>
</body>
만약 xml 파일이 이런식으로 되어있다면,
from bs4 import BeautifulSoup as bs
f = open('상단의파일','r',encoding = 'UTF-8')
l = f.read()
soup = bs(l, 'lxml')
if x in soup.findAll('item')
print(x.find('sgld'))
이 함수의 결과값이 none이 뜨는 이유가무엇일가요..? 어떤방식으로해야 돌아갈가요?