XMLport: Skip some nodes dynamically

ta5ta5 Member Posts: 1,164
Hi

Is it possible to skip some nodes within a dataport?
Example:
<xs:element name="person">
  <xs:complexType>
    <xs:choice>
      <xs:element name="employee" type="employee"/>
      <xs:element name="member" type="member"/>
    </xs:choice>
  </xs:complexType>
</xs:element>

The schema dictates a choice, so we have to import/export either the employee or the member, but not both. This is just an example, the real schema is much more complex containing several choices, otherwise I would first do some query with xpath and then choose the right XMLport...

Many thanks in advance
Thomas

Comments

  • ta5ta5 Member Posts: 1,164
    Nobody? Anyway, I guess I'll have to use DOM. :-k

    Thomas
  • ara3nara3n Member Posts: 9,256
    You could generate the xml file using xmlport. then load it into xmldom and delete the unnecessary elements.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ta5ta5 Member Posts: 1,164
    Thanks Rashed, in the meantime I have created the files via DOM. :mrgreen:

    Regards
    Thomas
Sign In or Register to comment.