APPLIES TO v8.0
I've got a large well-formed XML document.
I want to import only a few elements.
IMPORT xxx FROM XML
will crap out and abort if I don't have BOs for contactinfo, organizations, demographics.
I don't want that data.
I don't want to create BOs for it.
While playing with the new 8.1 REST stuff, I noticed it gracefully skipped elements that were not in your receiving data structure.
Need to start capturing a new element? Just add a new field to the BO and you're done.
But here, even with NO VALIDATION, I can't get it to not complain unless I manually edit the XML.
And then there's the fact that it wants BOs to be named exactly like the element... I HAVE TO HAVE BOs named "photo" and "socialProfile" for this to work? What if I already had BOs named that? [I guess thats when I'd have to use a rule to REPLACE strings to name them something else.]
How have some of you handled importing XML?
thx
jaymer...
EDIT
Solution
1) BobK below, with Rules for eliminating the Elements using REPLACE_PATTERN
2) V 8.1 will automatically skip elements that have not been defined in the BO, rather than complain about them
<?xml version='1.0' encoding='UTF-8'?><person>
<status>200</status>
<requestId>88ae7a21-3f67-41ce-a09b-3066091745df</requestId>
<likelihood>0.95</likelihood>
<photos>
<photo>
<type>linkedin</type>
<typeId>linkedin</typeId>
<typeName>LinkedIn</typeName>
<url>https://d2ojpxxtu63wzl.cloudfront.net/static/9fa48190a3169c13c5f5ba560d31eb90_740f93b30c9a0eaf95c64f8d88b95b0901ad0ae23f2858e675d3eae2532e984e</url>
<isPrimary>true</isPrimary>
</photo>
<photo>
<type>facebook</type>
<typeId>facebook</typeId>
<typeName>Facebook</typeName>
<url>https://d2ojpxxtu63wzl.cloudfront.net/static/49dcb60205d550b6f3e9938ca15528b6_ac06549936ced59b39c286473bc0d6b2926a38510c4e9d4848cee382252eaf52</url>
<isPrimary>false</isPrimary>
</photo>
</photos>
<contactInfo>
<familyName>H</familyName>
<fullName>Chr</fullName>
<givenName>Chr</givenName>
</contactInfo>
<organizations>
<organization>
<isPrimary>true</isPrimary>
<name>B</name>
<startDate>200</startDate>
<title>SEO</title>
<current>true</current>
</organization>
<organization>
<isPrimary>false</isPrimary>
<name>xxx</name>
<startDate>2010-06</startDate>
<title>Chief Executive Officer and Team Leader</title>
<current>true</current>
</organization>
</organizations>
<demographics>
<locationDeduced>
<normalizedLocation>Elk Grove, California, United States</normalizedLocation>
<deducedLocation>Elk Grove, California, United States</deducedLocation>
<city>
<deduced>false</deduced>
<name>Elk Grove</name>
</city>
<state>
<deduced>false</deduced>
<name>California</name>
<code>CA</code>
</state>
<country>
<deduced>false</deduced>
<name>United States</name>
<code>US</code>
</country>
<continent>
<deduced>true</deduced>
<name>North America</name>
</continent>
<county>
<deduced>true</deduced>
<name>Sacramento</name>
</county>
<likelihood>1.0</likelihood>
</locationDeduced>
<gender>Male</gender>
<locationGeneral>Elk Grove, California, United States</locationGeneral>
</demographics>
<socialProfiles>
<socialProfile>
<bio><p>What’s up, I’m Chris./p></bio>
<type>aboutme</type>
<typeId>aboutme</typeId>
<typeName>About.me</typeName>
<url>https://about.me/thec</url>
<username>thec</username>
</socialProfile>
<socialProfile>
<type>facebook</type>
<typeId>facebook</typeId>
<typeName>Facebook</typeName>
<url>https://www.facebook.com/chri</url>
</socialProfile>
<socialProfile>
<type>foursquare</type>
<typeId>foursquare</typeId>
<typeName>Foursquare</typeName>
<url>https://foursquare.com/user/70</url>
<id>722</id>
</socialProfile>
<socialProfile>
<followers>8</followers>
<type>google</type>
<typeId>google</typeId>
<typeName>GooglePlus</typeName>
<url>https://plus.google.com/1133749206842</url>
<id>113331842</id>
</socialProfile>
<socialProfile>
<bio>A technology</bio>
<type>gravatar</type>
<typeId>gravatar</typeId>
<typeName>Gravatar</typeName>
<url>https://gravatar.com/cha</url>
<username>ch</username>
<id>7</id>
</socialProfile>
</person>