0

It's my xml (for example)

<root>
  <node type="A">
    <this/> 
  </node>
  <node type="B">
    <that/> 
  </node>
</root>

I can't manage order and names of nodes. It xml MUST contains nodes in this order and with this names. So I found solutions for problem "different types with same names". It's clear. But how I can check order of nodes? There is MUST be 2 nodes (1 node and then 1 node ). Is it possible?

Thanx!

C. M. Sperberg-McQueen
  • 24,596
  • 5
  • 38
  • 65
  • This is principal different question then https://stackoverflow.com/questions/27878402/how-to-make-type-depend-on-attribute-value-using-conditional-type-assignment What different? 1) The xml MUST BE only how above. 2) xml with 1 node is incorrect 3) xml with 1 node is incorrect 4) xml with 2 node is incorrect 5) xml with 2 node is incorrect – user5555232 Nov 07 '17 at 21:38
  • You say the XML must have two nodes, but the XML you show has (by my manual count) five element nodes, two attribute nodes, and seven (or more) text nodes. That makes 14 nodes. – C. M. Sperberg-McQueen Nov 08 '17 at 01:13
  • Of course. I mean nodes with name is "node". But this math don't have decision for marked my question how "duplicate" isn't it? I showed reasons hy it is not duplicate. – user5555232 Nov 08 '17 at 12:53

0 Answers0