I have a bunch of documents in a MarkLogic xml database. One document has:
<colors>
<color>red</color>
<color>red</color>
</colors>
Having multiple colors is not a problem. Having multiple colors that are both red is a problem. How do I find the documents that have duplicate data?
...
I have a variable in xQuery of type xs:string with the value of an encoded HTML snippet (the content of a twitter tweet). It looks like this:
Headlines-Today • AP sources:
<b>Obama</b> pick for
Justice post withdraws : News - Rest
Of World - <a
href="http://shar.es/mqMAG&quot;&gt;http://shar....
So I have two nodes of elements that I'm essentially trying to join. I want the top level node to stay the same but the child nodes to be replaced by those cross referenced.
Given:
<stuff>
<item foo="foo" boo="1"/>
<item foo="bar" boo="2" />
<item foo="baz" boo="3"/>
<item foo="blah boo="4""/>
</stuff>
<list a="1" b="2">
<f...