30
C #을 사용하여 XML에서 모든 네임 스페이스를 제거하는 방법은 무엇입니까?
모든 XML 요소에서 네임 스페이스를 제거하는 깨끗하고 우아하며 스마트 한 솔루션을 찾고 있습니까? 그게 어떻게 생겼을까 요? 정의 된 인터페이스 : public interface IXMLUtils { string RemoveAllNamespaces(string xmlDocument); } NS를 제거하기위한 샘플 XML : <?xml version="1.0" encoding="utf-16"?> <ArrayOfInserts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <insert> <offer xmlns="http://schema.peters.com/doc_353/1/Types">0174587</offer> <type2 xmlns="http://schema.peters.com/doc_353/1/Types">014717</type2> <supplier xmlns="http://schema.peters.com/doc_353/1/Types">019172</supplier> <id_frame xmlns="http://schema.peters.com/doc_353/1/Types" /> …