<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Arial Narrow";
        panose-1:2 11 6 6 2 2 2 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi All,<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I&#8217;m having an issue while inserting an element into a node using xdmp:node-insert-child(). <o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>My xml structure is as below<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='margin-left:.5in'>&lt;version-info xmlns=&quot;http://namespace&quot;&gt;<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;id&gt;ABCD13255DEFG&lt;/id&gt;<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;additions/&gt;<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;updates/&gt;<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;deletes/&gt;<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>&nbsp; &lt;/version-info&gt;<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'><o:p>&nbsp;</o:p></p><p class=MsoNormal>I&#8217;m trying to insert &lt;parent-id&gt; 13242682898790&lt;/parent-id&gt; into the &lt;version-info&gt; as child using the xdmp:node-insert-child() as part of my code but the node is not getting inserted into the version-info xml. But when I tried to the same through CQ its working fine. <o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:#0000B4'>let</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black'> $</span><span style='font-size:10.0pt;font-family:"Courier New";color:red'>version-info-uri</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> := &#8220;/content/documents/sd/62211250/</span> ABCD13255DEFG<span style='font-size:10.0pt;font-family:"Courier New";color:black'>-version-info-7.xml&#8221;</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:#0000B4'>let</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black'> $</span><span style='font-size:10.0pt;font-family:"Courier New";color:red'>log1</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> := </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF'>xdmp:log</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF'>fn:concat</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:fuchsia'>&quot;Update Note: Version Info URI&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>, $</span><span style='font-size:10.0pt;font-family:"Courier New";color:red'>version-info-uri</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>))</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:#0000B4'>let</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black'> $</span><span style='font-size:10.0pt;font-family:"Courier New";color:red'>version-info</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> := </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF'>fn:doc</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>($</span><span style='font-size:10.0pt;font-family:"Courier New";color:red'>version-info-uri</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>)/pce:version-info<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&#8230;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&#8230;</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF'>xdmp:log</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF'>fn:concat</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:fuchsia'>&quot;version-info before&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>, $</span><span style='font-size:10.0pt;font-family:"Courier New";color:red'>version-info</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>)),</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:yellow;mso-highlight:yellow'>xdmp:node-insert-child</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:yellow;mso-highlight:yellow'>($</span><span style='font-size:10.0pt;font-family:"Courier New";color:red;background:yellow;mso-highlight:yellow'>version-info</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:yellow;mso-highlight:yellow'>,&lt;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:#007800;background:yellow;mso-highlight:yellow'>nmsp:parent-id</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:yellow;mso-highlight:yellow'>&gt;{$</span><span style='font-size:10.0pt;font-family:"Courier New";color:red;background:yellow;mso-highlight:yellow'>parent-id</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:yellow;mso-highlight:yellow'>}&lt;/</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:#007800;background:yellow;mso-highlight:yellow'>nmsp:parent-id</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:yellow;mso-highlight:yellow'>&gt;),</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF'>xdmp:log</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF'>fn:concat</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:fuchsia'>&quot;version-info after&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>, $</span><span style='font-size:10.0pt;font-family:"Courier New";color:red'>version-info</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>)),</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF'>xdmp:log</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF'>fn:concat</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:fuchsia'>&quot;parent-standard-id::&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>,$</span><span style='font-size:10.0pt;font-family:"Courier New";color:red'>parent-id</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>)),</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Could please let me know what is the issue with the above code. <o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><span style='font-family:"Arial Narrow","sans-serif"'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:12.0pt;font-family:"Arial Narrow","sans-serif";color:#17365D'>Sriram Gampa<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";color:#595959'>Off: 407-345-2386 |Cell: 612-867-3232|email:<i> Sriram.Gampa@hmhpub.com</i><o:p></o:p></span></b></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>