Help with if, when and for...I think?

Discussion in 'XML' started by johkar, Aug 6, 2003.

  1. johkar

    johkar Guest

    I think I am making this too complicated. I hope I explained well enough
    below. Thanks in advance. John

    I have a PDF form which is populated from the below XML (stripped down).
    The PDF form fields look like a - d below when blank.

    a. _______________
    b. _______________
    c. _______________
    d. _______________

    Under the extensions/Extension nodes:
    - There are many fieldTypeCodes under the extensions/Extension. However,
    for this problem, I am only concerned with fieldTypeCodes of 10 - 17. For
    these fieldTypeCodes, it will be outputted in the XML if there is a
    reportableAmount. So in the below XML, only fieldTypeCodes of 11, 14 and 16
    had reportableAmounts and were outputted in the XML.

    I need to check for all fieldTypeCodes of 10-17. There is no 10 in this
    instance so PDF input field A would be populated with the reportableAmount
    of fieldTypeCode 11. The resulting PDF should look like that below. Note
    that the description letter needs to be pulled of the FieldType node that
    corresponds.

    a. L 6635.86
    b. J 663.00
    c. N 5.86
    d.

    <?xml version="1.0" encoding="UTF-8"?>
    <ptrsTaxRecord>
    <TaxRecord>
    <taxDetail>
    <extensions>
    <Extension>
    <reportableText/>
    <fieldTypeCode>11</fieldTypeCode>
    <reportableAmount>6635.86</reportableAmount>
    </Extension>
    <Extension>
    <reportableText/>
    <fieldTypeCode>14</fieldTypeCode>
    <reportableAmount>663.00</reportableAmount>
    </Extension>
    <Extension>
    <reportableText/>
    <fieldTypeCode>16</fieldTypeCode>
    <reportableAmount>5.86</reportableAmount>
    </Extension>
    </extensions>
    </taxDetail>
    <taxReturnType>
    <FieldType>
    <description>D</description>
    <fieldTypeCode>10</fieldTypeCode>
    </FieldType>
    <FieldType>
    <description>L</description>
    <fieldTypeCode>11</fieldTypeCode>
    </FieldType>
    <FieldType>
    <description>E</description>
    <fieldTypeCode>12</fieldTypeCode>
    </FieldType>
    <FieldType>
    <description>G</description>
    <fieldTypeCode>13</fieldTypeCode>
    </FieldType>
    <FieldType>
    <description>J</description>
    <fieldTypeCode>14</fieldTypeCode>
    </FieldType>
    <FieldType>
    <description>M</description>
    <fieldTypeCode>15</fieldTypeCode>
    </FieldType>
    <FieldType>
    <description>N</description>
    <fieldTypeCode>16</fieldTypeCode>
    </FieldType>
    <FieldType>
    <description>P</description>
    <fieldTypeCode>17</fieldTypeCode>
    </FieldType>
    </fieldTypes>
    </taxReturnType>
    </TaxRecord>
    </ptrsTaxRecord>
     
    johkar, Aug 6, 2003
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.