Skip to Content
avatar image
Former Member

XML SImple transform ignoring <tags>


I am attempting to read in a file using a Simple Transform that may contain certain blocks of data that I do not wish to process. Per my example, how does one go about ingnoring the data in <HB> while still reading in <HA> and <HC>. It has been my experience that if every single potential <tag> is not accounted for the program will short dump. I would prefer to not have to define tags for an entire XML STD, but rather only include those elements that I an required to capture. Thanks in advance.

<HA>

     <employee>

          <name>Bill</name>

          <date>01/01/2015</date>

     </employee>

     <employee>

          <name>Bob</name>

          <date>01/02/2015</date>

     </employee>

</HA>

<HB>

     <address>

          <state>AZ</state>

      </address>

     <address>

          <state>AR</state>

     </adress>

</HB>

<HC>

     <age>    

          <dob>12/25/1980</dob>

     </age>

     <age>

          </dob>07/04/1976</dob>

     </age>

</HC>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 28, 2015 at 12:42 PM

    Could you try a <tt:skip name="HB"/> command ?

    (The following XML content shouldbe consumed up to the end of the current element.)

    Regards,

    Raymond

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I would try this.

      <tt:skip count="*" name="HA">

      </tt:skip>


      <tt:skip count="*" name="address">

      </tt:skip>


      <tt:skip count="*" name="state">

      </tt:skip>

      N.B : "*" indicates all the nodes


      R