У меня есть XML-данные, которые я хотел бы просмотреть в удобочитаемом формате с помощью VB.NET
Привет, я новичок в программировании xml, и мой клиент использует инструмент, которым они не делятся с нами, поэтому мы вынуждены писать наш код. мы используем vb.net
содержимое xml-файла приведено ниже, если вы можете помочь с кодом, мы будем признательны.
<AuditResult name="Windows Server Baseline v1.01" created="2015-7-5 12:25:6" type="Assessment Only"> <Section name="Operating System" state="Compliant" further-state=""> <Result name="Computer Name" type="report">DEVSTUDIO </Result> <Result name="Operating System" type="report">Microsoft Windows Server 2008 R2 Standard </Result> <Result name="Operating System Architecture" type="report">64-bit </Result> <Result name="Operating System Service Pack" type="report">Service Pack 1 </Result> <Result name="Active Directory Domain" type="report">contoso.com </Result> <Result name="Time Zone" type="report">(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi </Result> <Result name="Terminal Services" type="compliance" state="Compliant" further-state=""> </Result> <Result name="VSS Writers" type="compliance" state="Compliant" further-state=""> </Result> <Result name="Powershell Execution Policy" type="compliance" state="Compliant" further-state=""> </Result> <Result name="OS Disk Name" type="compliance" state="Compliant" further-state=""> </Result> <Result name="Inplace Upgrade Cleanup" type="compliance" state="Compliant" further-state=""> </Result> </Section> <Section name="Operating System (Windows Server 2008 R2)" state="Not Compliant" further-state=""> <Result name="System Partition" type="compliance" state="Compliant" further-state=""> </Result> <Result name="Role & Feature - .NET Framework" type="compliance" state="Compliant" further-state=""> </Result> <Result name="Role & Feature - RSAT" type="compliance" state="Compliant" further-state=""> </Result> <Result name="Role & Feature - Backup Features" type="compliance" state="Compliant" further-state=""> </Result> <Result name="Role & Feature - Backup Tools" type="compliance" state="Compliant" further-state=""> </Result> <Result name="Role & Feature - SNMP" type="compliance" state="Compliant" further-state=""> </Result> <Result name="Role & Feature - Telnet Client" type="compliance" state="Compliant" further-state=""> </Result> <Result name="VSS Hotfix - KB2532153" type="compliance" state="Not Compliant" further-state="">Return Code: 1</Result> <Result name="VSS Hotfix - KB2548124" type="compliance" state="Not Compliant" further-state="">Return Code: 1</Result> <Result name="VSS Hotfix - KB2614892" type="compliance" state="Not Compliant" further-state="">Return Code: 1</Result> <Result name="Windows Firewall - Public Profile Off" type="compliance" state="Compliant" further-state=""> </Result> <Result name="Windows Firewall - Private Profile Off" type="compliance" state="Compliant" further-state=""> </Result> <Result name="Windows Firewall - Domain Profile Off" type="compliance" state="Compliant" further-state=""> </Result> <Result name="Windows Activation" type="compliance" state="Compliant" further-state=""> </Result> <Result name="IPv6 Disabled" type="compliance" state="Compliant" further-state=""> </Result> <Result name="User Account Control Disabled" type="compliance" state="Compliant" further-state=""> </Result> </Section> <Section name="Operating System (Windows Server 2012 R2)" skipped="True" /> <Section name="Operating System (produciton AD)" skipped="True" /> <Section name="Operating System (DEV AD)" skipped="True" /> <Section name="Operating System (Staging)" state="Not Compliant" further-state="">
Что я уже пробовал:
Я ищу, как прочитать вышеприведенный файл с помощью vb.net, так как я новичок в xml-кодировании и прошу вашей помощи