• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAVA how to get value from sub tag of sub tag  RSS feed

 
Ranch Hand
Posts: 39
IBM DB2 Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
below is the sample my xml

<SegmentSheetEntityList>
    <SegmentSheetEntity>
      <ReportDate>2016-12-31</ReportDate>
      <PeriodEndingDate>2016-12-31</PeriodEndingDate>
      <FileDate>2017-03-29</FileDate>
      <StatementType>Annual</StatementType>
      <DataType>A</DataType>
      <CurrencyId>USD</CurrencyId>
      <FiscalYearEnd>12</FiscalYearEnd>
      <AccessionNumber>0001144204-17-017344</AccessionNumber>
      <FormType>10-K</FormType>
      <SegmentDetailEntityList>
        <SegmentDetailEntity>
          <SegmentType>Business</SegmentType>
          <SegmentName>Single segment</SegmentName>
          <IsPrimarySegment>true</IsPrimarySegment>
          <ValueType>Reported</ValueType>
          <IsSubTotal>0</IsSubTotal>
          <SegmentReportDetailEntityList>
            <SegmentReportDetailEntity>
              <DataName>Operating Revenue</DataName>
              <DataValue>12855811.000000</DataValue>
              <CalculationIndicator>false</CalculationIndicator>
            </SegmentReportDetailEntity>
          </SegmentReportDetailEntityList>
        </SegmentDetailEntity>
        <SegmentDetailEntity>
          <SegmentType>Geographic</SegmentType>
          <SegmentName>Europe</SegmentName>
          <IsPrimarySegment>true</IsPrimarySegment>
          <RegionName>Europe</RegionName>
          <ValueType>Reported</ValueType>
          <IsSubTotal>0</IsSubTotal>
          <SegmentReportDetailEntityList>
            <SegmentReportDetailEntity>
              <DataName>Total Assets</DataName>
              <DataValue>9766602.000000</DataValue>
              <CalculationIndicator>false</CalculationIndicator>
            </SegmentReportDetailEntity>
            <SegmentReportDetailEntity>
              <DataName>Operating Revenue</DataName>
              <DataValue>11953015.000000</DataValue>
              <CalculationIndicator>false</CalculationIndicator>
            </SegmentReportDetailEntity>
          </SegmentReportDetailEntityList>
        </SegmentDetailEntity>


after i code, for SegmentReportDetailEntityList, DataName, Data Value always get
DataName : Operating Revenue
DataValue : 12855811.000000
CalculationIndicator : true

for others tag is no problem.

below is my coding:



how to get the value correctly? Please  kindly advice.

Thanks and best regards
SHaron
 
There are 10 kinds of people in this world. Those that understand binary get this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!