로그 파일이 있는데이 파일에서 모든 xml을 가져 오는 programm를 작성해야합니다. 파일 당신이 날은 정규 표현식 또는 다른 뭔가를 사용하는 것이 좋습니다 어떤 조언을 줄 수원시 텍스트 파일에서 모든 XML을 가져 옵니까?
text
text
xml
text
xml
text
etc
처럼 보인다? 아마도 dom4j로 할 수 있을까요?
regexp를 사용하려고하면 텍스트 부분에 <>
태그가있는 다음 문제를 참조하십시오.
업데이트 1 : XML 예제
SOAP message:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
here is body part of valid xml
</soapenv:Body>
</soapenv:Envelope>
text,text,text,text
symbols etc
SOAP message:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
here is body part of valid xml
</soapenv:Body>
</soapenv:Envelope>
text,text,text,text
symbols etc
감사합니다.
^[A-ZA-Z] [A-ZA -0] + [\ n] * $ –