You are here:  » Support XML field attributes

Support Forum



Support XML field attributes

Submitted by Andrewc on Wed, 2010-02-03 12:37 in

Hi David

I have a feed that contains some values as attributes. How would I be able to parse these variables with PT?

Example below:

<result manufacturer="Microsoft Software" format="" regioncode="" hardwareplatform="Xbox 360" brand="Microsoft" model="52M-00069" ean="xxxxx" upc="xxxxx" productgroup="Video Games" author="" binding="Video Game" publicationdate="" artist="" label="Microsoft Software" releasedate="2009-04-25" salesrank="0" rating="0" numreviews="0" deliverytime="7 to 15 Working Days" category="Video Games" subtitles="" prodtypename="VIDEO_GAME_ACCESSORIES" prodtypesubcat="" weight="0.105" length="18.5" width="13" height="2.25" volweight="0.30">
<similaritem/>
<accessories/>
<review/>
<song/>
</result>

Basically is it possible to parse XML attributes?

Submitted by support on Wed, 2010-02-03 14:25

Hi Andrew,

Yes - they should work fine, the field names should appear as in "RESULT-BRAND" for example. This means it's most likely autodetection of the feed format that has not worked for this particular feed. On Feed Registration Step 1, make sure that the auto-detected Format String ends in "RESULT/". If it doesn't, delete anything that appears after that point and then continue to step 2.

If that's not the case or it still doesn't look right; if you could email me a link to your site; and the filename of the feed I'll download it from your /feeds/ folder and check it out for you...

Cheers,
David.

Submitted by Andrewc on Thu, 2010-02-04 07:41

Hey David

Just after I posted this, I did as you mentioned and deleted the extra items after RESULT/

Worked BEAUTIFULLY!!! Thanks! Really impressed, that extra things like that are supported..
You could have easy asked extra to add that functionality.

Enjoy your day