Hi Jeremy, good question! We don''t discussion the tradeoffs much in the documentation. The design intent of HDS is to be
a lightweight replacement for DOM based XML (which DOMXDA is a wrapper for) for representing hierarchical data. That has always
been the most common usage of XML in processing with NetKernel. It allows random access to the structure and is much lighter
weight in terms of memory and processing time than DOM because it has less complexity and corner cases. It also allows for
the carriage of POJOs rather than strings. HDS is also immutable which is a big positive too. HDS supports forests! Not a
statement about it''s green credentials but rather it''s ability to have more than one root node - this makes it useful for
representing lists.
There are two negatives with HDS vs. DOM XML which may or may not be an issued depending up what you are doing. Firstly HDS doesn''t support full XPath so you need build up expressions using a combination of the simple path selection XPath subset it does support and the HDSPredicate based filtering. You can do most stuff with this but if you do need complex expressions you''d be better off using DOM. The second negative is that it isn''t designed for representing documents with mixed content, basically each node in the tree has a single value, not values dispersed with children.
Yes transreptors exists to convert between XML and HDS. Most permutations are covered.
Cheers,
Tony
There are two negatives with HDS vs. DOM XML which may or may not be an issued depending up what you are doing. Firstly HDS doesn''t support full XPath so you need build up expressions using a combination of the simple path selection XPath subset it does support and the HDSPredicate based filtering. You can do most stuff with this but if you do need complex expressions you''d be better off using DOM. The second negative is that it isn''t designed for representing documents with mixed content, basically each node in the tree has a single value, not values dispersed with children.
Yes transreptors exists to convert between XML and HDS. Most permutations are covered.
Cheers,
Tony