Responsive Ad Area

Share This Post

test

Parse XML by only using tag names

I want to parse the following XML by only using tag names. More specifically, I want to get at the values of each BatchLine. How do I do this cleanly?

<?xml version="1.0" encoding="UTF-8"?>
<Batch>
  <DocumentName>blahblah</DocumentName>
  <Date>2019/02/07</Date>
  <Time>12:05:27</Time>
  <FileName>file name </FileName>
  <FileType>PDF</FileType>
  <BatchId>2A9936E1-7211-4419-A6A1-6DB3A03C4317</BatchId>
  <GrandTotalPages>30</GrandTotalPages>
  <GrandTotalSheets>15</GrandTotalSheets>
  <TotalRecords>3</TotalRecords>
  <BatchLines>
     <BatchLine>
        <SeqNo>1</SeqNo>
        <BatchLineId>2A9936E1-7211-4419-A6A1-6DB3A03C4317</BatchLineId>
        <TotalPages>14</TotalPages>
        <TotalSheets>7</TotalSheets>
     </BatchLine>
     <BatchLine>
        <SeqNo>2</SeqNo>
        <BatchLineId>3A9936E1-7211-4419-A6A1-6DB3A03C4317</BatchLineId>
        <TotalPages>16</TotalPages>
        <TotalSheets>8</TotalSheets>
     </BatchLine>
  </BatchLines>
</Batch>


Parse XML by only using tag names
Parse XML by only using tag names
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar