0

i search for an solution to read an specified xml file in javascript. Here is the example of data from the xml file:

<ExternalArchive Name="Demo">
<DocumentItems>
    <DocumentItem CreatedDate="20161130" DocumentClassName="KD_AKTEN" 
                    DocumentId="L90NHFJ7" DocumentTypName="Demoinvoice" 
                    FilingCabinetName="Temp01" UserObjectNumber="9" 
                    UserObjectTypeName="PDF" File="Test.PDF" 
                    SignatureFile="" ReportFile="" PageCount="1">
        <DocIndexValue IndexfieldName=BELEG_DAT> 
            <Value>20161130</Value> 
        </DocIndexValue> 
        <DocIndexValue IndexfieldName=BELEG_NR> 
            <Value>123456</Value> 
        </DocIndexValue> 
        <DocIndexValue IndexfieldName=BRUTTO> 
            <Value>339,42</Value> 
        </DocIndexValue> 
        <DocIndexValue IndexfieldName=FIRMA> 
            <Value>700</Value> 
        </DocIndexValue> 
        <DocIndexValue IndexfieldName=NETTO> 
            <Value>339,42</Value> 
        </DocIndexValue> 
        <DocIndexValue IndexfieldName=PERSKONTO> 
            <Value>81914</Value> 
        </DocIndexValue> 
        <DocIndexValue IndexfieldName=USER> 
            <Value>Test User</Value> 
        </DocIndexValue>
    </DocumentItem> 
</DocumentItems> 

I need to read the "File"-value and the values from the "DocIndexValue". How can i read this from the file?

David R
  • 14,711
  • 7
  • 54
  • 72
  • 1
    What have you tried so far? [Here](https://www.w3schools.com/xml/dom_nodes_access.asp) is a tutorial on how you can easily parse an XML in javascript using the DOM. – Wolfgang Radl Mar 07 '17 at 12:35
  • Possible duplicate of [Parse XML using JavaScript](http://stackoverflow.com/questions/17604071/parse-xml-using-javascript) – David R Mar 07 '17 at 12:41

0 Answers0