Propagate fields from elements 2 or 3 levels above current element



Hi,
I am currently trying to insert multilevel data to 5 tables from one xml
source file. It inserts without errors, however, I noticed that I can only
propagate element values to the child only if the element value is from a
hierarchy above it.

For example, I have the following hierarchies/entities within a file:
<CONTROL>
<ORDER> (repeating)
<ORDER_ITEM> (repeating)
<FEATURES> (repeating)
</FEATURES>
</ORDER_ITEM>
<WORK_INSTRUCTIONS> (repeating)
</WORK_INSTRUCTIONS>
</ORDER>
</CONTROL>

In the table destined to hold fields for <FEATURES>, I also included one
field from <CONTROL> and another from <ORDER>. However, both remain blank
when I look at this table. Instead, only the the line number field from
<ORDER_ITEM> show up in addition to the fields from <FEATURES>. Is there
another way I could structure my annotated schema or tables to be able to
hold these needed fields?

I can post or send my table DDL, my annotated schema, and the sample xml
file upon request.

Regards,
Tristan
.



Relevant Pages

  • Re: Storing hierarchies from XML into relational tables
    ... You haven't made clear what sort of relational tables you plan to use to store the data from your hierarchy. ... Parent VARCHAR ... Given an xml document that represents a heirarchy: ...
    (microsoft.public.sqlserver.xml)
  • Re: A good argument for XML
    ... where is hierarchy that XML nuts are so much talking about? ... > many Projects per Customer. ... > This comes from an actual production report. ...
    (comp.databases.theory)
  • Re: Appending XMLELEMENTs to existing XMLType
    ... I am using this query so far to pull out the XML elements: ... what I want is for the self-referencing hierarchy to be ... to append the XML nodes to the parent node? ... catXML = concatenate processCategory ...
    (comp.databases.oracle.server)
  • Re: Correct Registry Hive to Use
    ... any advantage to using XML other than that it does hierarchical stuff. ... It ended up with pretty verbose INI files - a lot of the data lines had ... But basically - because an INI file easily has two levels of hierarchy ...
    (microsoft.public.vb.general.discussion)
  • Re: Recordset to XML and back
    ... I persist a hierarchical disconnected recordset as xml. ... hierarchy). ... >> I'm persisting an ado hierarchical recordset to xml and cleaning it up. ...
    (microsoft.public.vb.database.ado)