XStream
  1. XStream
  2. XSTR-38

ReferenceByPathMarshaller that uses XPath instead of IDs

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6
    • Fix Version/s: 0.6
    • Component/s: Core
    • Labels:
      None

      Description

      Would like to offer a third marshaller, ReferenceByPathMarshaller, to sit as best of both worlds between TreeMarshaller and ReferenceByIdMarshaller.

      ------------

      TreeMarshaller:

      • clean XML
      • does not support duplicate or circular references

      <people>
      <person>
      <car>
      <make>Ford</make>
      </car>
      </person>
      <person>
      <car>
      <make>Ford</make>
      </car>
      </person>
      </people>

      ------------

      ReferenceByIdMarshaller:

      • adds bloat of IDs to XML
      • supports duplicate and circular references (full object graphs)

      <people id="1">
      <person id="2">
      <car id="3">
      <make>Ford</make>
      </car>
      </person>
      <person id="4">
      <car reference="3"/>
      </person>
      </people>

      ------------

      ReferenceByPathMarshaller

      • clean XML... only writes references when needed
      • supports duplicate and circular references (full object graphs)

      <people>
      <person>
      <car>
      <make>Ford</make>
      </car>
      </person>
      <person>
      <car path="../person[1]/car"/>
      </person>
      </people>

        People

        • Assignee:
          Unassigned
          Reporter:
          Joe Walnes
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: