In the example below I have some CD's in an XML and child object LOCATION to store what rooms they may be in. I'm using version 8.3 and can share my bsv if that is helpful. All the records with more than one LOCATION (and ROOM attribute) are working great. The one with only one LOCATION does not create a ref table entry and no LOCATION is created.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
<LOCATIONS>
<LOCATION ROOM="Living Room" SHELF="Test"/>
<LOCATION>
<ROOM>Bedroom 1</ROOM>
</LOCATION>
</LOCATIONS>
</CD>
<CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
<LOCATIONS>
<LOCATION>
<ROOM>Basement</ROOM>
</LOCATION>
<LOCATION>
<ROOM>Den</ROOM>
</LOCATION>
<LOCATION ROOM="Car" SHELF="Console"/>
</LOCATIONS>
</CD>
<CD>
<TITLE>Greatest Hits</TITLE>
<ARTIST>Dolly Parton</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>RCA</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1982</YEAR>
<LOCATIONS>
<LOCATION ROOM="Bedroom 2" SHELF="Bottom"/>
</LOCATIONS>
</CD>
<CD>
<TITLE>Garbage Man</TITLE>
<ARTIST>Oscar</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Smelly Records</COMPANY>
<PRICE>1.90</PRICE>
<YEAR>1985</YEAR>
<LOCATIONS>
<LOCATION ROOM="Living Room" SHELF="Test"/>
<LOCATION>
<ROOM>Bedroom 1</ROOM>
</LOCATION>
</LOCATIONS>
</CD>
</CATALOG>