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:
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?
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.
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.