Map individual XML Schema to Individual msg
Hi ,
I've created a BizTalk Application which is having a receive port (with
SELECT * FROM CATEGORIES). It connects to Northwind database, categories
table. It returns me the xml as given below:
<Categories xmlns="http://Categories"><Categories CategoryID="1"
CategoryName="Beverages" Description="Soft drinks, coffees, teas, beers, and
ales" Picture="dbobject/Categories[@CategoryID='1']/@Picture" /><Categories
CategoryID="2" CategoryName="Condiments" Description="Sweet and savory
sauces, relishes, spreads, and seasonings"
Picture="dbobject/Categories[@CategoryID='2']/@Picture" /><Categories
CategoryID="3" CategoryName="Confections" Description="Desserts, candies,
and sweet breads" Picture="dbobject/Categories[@CategoryID='3']/@Picture"
/><Categories CategoryID="4" CategoryName="Dairy Products"
Description="Cheeses"
Picture="dbobject/Categories[@CategoryID='4']/@Picture" /><Categories
CategoryID="5" CategoryName="Grains/Cereals" Description="Breads, crackers,
pasta, and cereal" Picture="dbobject/Categories[@CategoryID='5']/@Picture"
/><Categories CategoryID="6" CategoryName="Meat/Poultry"
Description="Prepared meats"
Picture="dbobject/Categories[@CategoryID='6']/@Picture" /><Categories
CategoryID="7" CategoryName="Produce" Description="Dried fruit and bean
curd" Picture="dbobject/Categories[@CategoryID='7']/@Picture" /><Categories
CategoryID="8" CategoryName="Seafood" Description="Seaweed and fish"
Picture="dbobject/Categories[@CategoryID='8']/@Picture" /></Categories>
Then using Scope Block, I loop thru and get individual XML properly saved at
a particular location. The XML formal is:
<Categories CategoryID="1" CategoryName="Beverages" Description="Soft
drinks, coffees, teas, beers, and ales"
Picture="dbobject/Categories[@CategoryID='1']/@Picture"
xmlns="http://Categories" />
Now, my requirement is NOT to save this XML to specified location, rather I
want to access its individual node/attributes. I tried following options:
1. Promoted properties in the destination schema (envelop type) and set
appropriate BodyXPath property of the schema.
2. Tried to construct a new schema (promoted all its fields so that I can
access each) from this envelop schema and map the fields using Map file.
But none of these options are working. Any idea, how can I access individual
attributes?
Thanks a lot.
Atul
|