Mariano you are amazing, thank you for the assistance. I'm sorry that i didn't give you full information before. i'm attaching the updated xml file and my code below. The xml structure is like this: Extract > Profile (which there will be multiple profiles) > Traveler (i'm assuming there could be multiple traveler's within one profile) > Customer (and again i'm assuming there could be multiple Customers within Traveler). with that being said I took your code that you had sent before and wrote the code i have below. it works, but i'm only seeing one line. i figure i'll use the parent (extract) as my anchor and then use "./" to display results. if you could assist me in this i would be greatly appreciative. Thanks again
USE OPENXMLTesting
GO
DECLARE @XML AS XML, @hDoc AS INT, @SQL NVARCHAR (MAX)
SELECT @XML = XMLData FROM XMLwithOpenXML
EXEC sp_xml_preparedocument @hDoc OUTPUT, @XML
SELECT DOB, Gendr,Title,FName,MName,LName,TelType,AreaCode,PhoneNumb,Email,AddType,Addrs,City,CntryCd,DocID,DocType,EffDate,ExpDate,VenTypeCode,VenCode,MembID,MemLevl,
AcctBal,MemStartDate,MilesExp,MileExpDate,SSRCode
FROM OPENXML(@hDoc, 'Extract')
WITH
(
DOB [date] './Profile/Traveler/Customer/@BirthDate',
Gendr [nvarchar](3) './Profile/Traveler/Customer/@GenderCode',
Title [varchar](5) './Profile/Traveler/Customer/PersonName/NamePrefix',
FName [varchar](5) './Profile/Traveler/Customer/PersonName/GivenName',
MName [varchar](5) './Profile/Traveler/Customer/PersonName/MiddleName',
LName [varchar](5) './Profile/Traveler/Customer/PersonName/SurName',
TelType[varchar](5) './Profile/Traveler/Customer/Telephone/@LocationTypeCode',
AreaCode[varchar](3)'./Profile/Traveler/Customer/Telephone/ParsedPhoneNumber/@AreaCd',
PhoneNumb[varchar](10)'./Profile/Traveler/Customer/Telephone/ParsedPhoneNumber/@PhoneNumber',
Email[varchar](20)'./Profile/Traveler/Customer/Email/@EmailAddress',
AddType[varchar](5)'./Profile/Traveler/Customer/Address/@LocationTypeCode',
Addrs[varchar](20)'./Profile/Traveler/Customer/Address/AddressLine',
City[varchar](15)'./Profile/Traveler/Customer/Address/CityName',
CntryCd[varchar](5)'./Profile/Traveler/Customer/Address/CountryCode',
DocID[varchar](10)'./Profile/Traveler/Customer/Document/@DocID',
DocType[varchar](10)'./Profile/Traveler/Customer/Document/@DocTypeCode',
EffDate[date]'./Profile/Traveler/Customer/Document/@EffectiveDate',
ExpDate[date]'./Profile/Traveler/Customer/Document/@ExpireDate',
VenTypeCode[varchar](3)'./Profile/Traveler/Customer/CustLoyalty/@VendorTypeCode',
VenCode[varchar](3)'./Profile/Traveler/Customer/CustLoyalty/@VendorCode',
MembID[varchar](10)'./Profile/Traveler/Customer/CustLoyalty/@MembershipID',
MemLevl[varchar](3)'./Profile/Traveler/Customer/CustLoyalty/MembershipLevel/@MembershipLevelTypeCode',
AcctBal[int]'./Profile/Traveler/Customer/CustLoyalty/CustLoyaltyTotals/@AccountBalance',
MemStartDate[date]'./Profile/Traveler/Customer/CustLoyalty/CustLoyaltyTotals/@MembershipStartDate',
MilesExp[int]'./Profile/Traveler/Customer/CustLoyalty/CustLoyaltyTotals/@MilesToExpire',
MileExpDate[date]'./Profile/Traveler/Customer/CustLoyalty/CustLoyaltyTotals/@MilesExpireDate',
SSRCode[varchar](5)'./Profile/Traveler/TPA_Extensions/SSR/@SSRCode'
)
EXEC sp_xml_removedocument @hDoc
GO