Hardik Patel

Hardik Patel

  • 1.6k
  • 69
  • 652

How to convert EDRM XML File into DataTable in C#?

Oct 4 2021 4:13 AM

Hi Team,

We need to Convert the EDRM XML file into DataTable where we need to identify All Node values like Tags, Files, Relationships, Folders.

please attach any document for EDRM XML to identify node values easily. 

Example of EDRM File

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Root RootFilePath="/temp/" MinorVersion="0" MajorVersion="1"
Locale="US" Description="Test Case"
DataInterchangeType="Update" CaseId="Case1">
<Batch name="Sample Batch">
<Documents>
<Document MimeType="text/plain" DocType="Text File" DocID="1">
</Document>
<Document MimeType="text/plain" DocType="Text File 2" DocID="2">
<Tags>
<Tag TagValue="Tag Value??" TagName="Tag Name??"
TagDataType="LongText" ModifiedBy="Jane Doe">
</Tag>
</Tags>
<Files>
<File FileType="7bit ASCII Doc">
<ExternalFile MergeFileNum="0" MergeFileCount="0"
Hash="MD5" FileSize="1000"
FilePath="c:\" FileName="data.txt">
</ExternalFile>
</File>
</Files>
<Reviews>
<Review ReviewId="1">
<Tag TagValue="Tag Value??" TagName="Tag Name??"
TagDataType="LongText" ModifiedBy="Jane Doe">
</Tag>
</Review>
</Reviews>
<Locations>
<Location>
<Custodian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xsi:type="xs:string">
John Doe
</Custodian>
<LocationURI>ATL</LocationURI>
</Location>
</Locations>
</Document>
</Documents>
<Relationships>
<Relationship Type="NearDupe" ParentDocId="2" ChildDocId="1">
</Relationship>
</Relationships>
<Folders>
<Folder FolderParentName="" FolderName="SampleFolder">
<Folder FolderParentName="SampleFolder" FolderName="SampleFolder2">
</Folder>
<Document DocId="1">
</Document>
<Document DocId="2">
</Document>
</Folder>
</Folders>
</Batch>
</Root>

 


Answers (4)