Problems with IXMLPropertySet SetPropertyX

595
3
11-04-2011 08:11 AM
AndrewEgleton
New Contributor III
Hi,

I need to update some ArcGIS 10 metadata in files that have had their metadata upgraded from ArcGIS 9 FGDC metadata. Most things seem to work fine, but if I try the code bellow it will only work if the tags exist already:
pXMLProps.SetPropertyX( _
     "dataIdInfo/resConst/LegConsts/othConsts[../accessConsts/RestrictCd/@value='008']", _
     strAccess, esriXPTText, esriXSPAAddOrReplace, False)


There are a few other tags that use similar Xpaths and they are broken too, but all the tags with a straight forward tag work fine even when they aren't already present.

Any advice on how to resolve or work around this issue?

Thanks,
Andy
0 Kudos
3 Replies
AlexanderGray
Occasional Contributor III
Do you have service pack 3 installed?  In my research I saw many fixes related to metadata in SP3.
0 Kudos
AndrewEgleton
New Contributor III
Yes, I have service pack 3 installed.

This issue only affects tags where there is a "partner" code value, which in the tags we are intrested in includes Originator, Publisher, and points of contact.
0 Kudos
AndrewEgleton
New Contributor III
While the code above still fails to work if the tags are missing, I have managed to resolve why the tags are missing!
The upgrade metadata tool at service pack 3 is creating incomplete metadata, going back to service pack 2 and using the upgrade metadata tool creates all the tags we need correctly.
0 Kudos