Questions tagged [xml.modify]

xml.modify is a function in MS SQL to modify xml data.

In MS SQL Server, xml data can be edited in SQL queries using the function xml.modify.

29 questions
0
votes
1 answer

How to remove XML attribute [xsi:nil "true"] for a tag and insert text for the same tag

I want to remove the attribute xsi:nil "true" for GeographicalLimit tag and I need to enter some dummy text for the same using SQL Current XML:
text text…
Madhavan
  • 3
  • 2
0
votes
1 answer

Transact sql (2012) Using @xml.modify to insert 'elements using a variable

I need to add an element using a variable This works -- declare @XML xml = '
0
votes
1 answer

Use of xml.modify from nested XML - SSRS Subscription Table

I'm trying to do a bulk update on email addresses stored in the ExtensionSettings columns from the Subscription table in SSRS database. I'm a bit lost on how to update the TO and CC values from the XML column.
0
votes
2 answers

C# XML - Modify a line of a node

I have for example the following XML-File. As clean identifier exists "EA MagicNo" with a single id that will never be used twice. In this example you can see, that the "Symbol" behind "EA MagicNo=111" is empty and must get a value e.g. "BBB".
Dragon
  • 49
  • 7
0
votes
1 answer

How to replace a tag with another in sql server XML file

I am working on a table in sql server which stores xml file in a column. In that xml file I am doing some changes. The XML file looks like: <Student> <InputNumber type="int" min="0" max="100" name="age"…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/sql-server" class="post-tag grid--cell" title="show questions tagged 'sql-server'" rel="tag">sql-server</a> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/xml.modify" class="post-tag grid--cell" title="show questions tagged 'xml.modify'" rel="tag">xml.modify</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Apr 16 '20 at 14:12">asked Apr 16 '20 at 14:12</time> <a href="../../users/12192978/richa-verma" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/12192978.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="richa verma" /> </a> <div class="s-user-card--info"> <a href="../../users/12192978/richa-verma" class="s-user-card--link">richa verma</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">247</li> <li class="s-award-bling s-award-bling__silver" title="2 silver badges">2</li> <li class="s-award-bling s-award-bling__bronze" title="13 bronze badges">13</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-52504950"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/52504950/anylogic-convert-alp-from-version-8-3-2-to-7-1-2" class="question-hyperlink">Anylogic convert ALP from Version 8.3.2 to 7.1.2</a></h3> <div class="excerpt">I have a Simulation running in the Version 8.3.2 of Anylogic. But now I want to change it to 7.1.2. Are there any possibilities, by changing some code in the ALP manually? Thanks for any help. </div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/version" class="post-tag grid--cell" title="show questions tagged 'version'" rel="tag">version</a> <a href="../../questions/tagged/simulation" class="post-tag grid--cell" title="show questions tagged 'simulation'" rel="tag">simulation</a> <a href="../../questions/tagged/anylogic" class="post-tag grid--cell" title="show questions tagged 'anylogic'" rel="tag">anylogic</a> <a href="../../questions/tagged/xml.modify" class="post-tag grid--cell" title="show questions tagged 'xml.modify'" rel="tag">xml.modify</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 25 '18 at 18:49">asked Sep 25 '18 at 18:49</time> <a href="../../users/10303159/niknet" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/10303159.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="NikNet" /> </a> <div class="s-user-card--info"> <a href="../../users/10303159/niknet" class="s-user-card--link">NikNet</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">45</li> <li class="s-award-bling s-award-bling__bronze" title="8 bronze badges">8</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-50160062"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/50160062/how-to-modify-continue-reading-link" class="question-hyperlink">How to modify continue reading link?</a></h3> <div class="excerpt">If you you DOM to show your RSS in your HTML you will find the in the end of the content "Continue reading" and with the permalink(). You can check my feed here This is the script before end of tag <p class="link-more"><a…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/wordpress" class="post-tag grid--cell" title="show questions tagged 'wordpress'" rel="tag">wordpress</a> <a href="../../questions/tagged/rss" class="post-tag grid--cell" title="show questions tagged 'rss'" rel="tag">rss</a> <a href="../../questions/tagged/feed" class="post-tag grid--cell" title="show questions tagged 'feed'" rel="tag">feed</a> <a href="../../questions/tagged/xml.modify" class="post-tag grid--cell" title="show questions tagged 'xml.modify'" rel="tag">xml.modify</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked May 03 '18 at 16:42">asked May 03 '18 at 16:42</time> <a href="../../users/9726691/eitren" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/9726691.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="eitren" /> </a> <div class="s-user-card--info"> <a href="../../users/9726691/eitren" class="s-user-card--link">eitren</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1</li> <li class="s-award-bling s-award-bling__bronze" title="2 bronze badges">2</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-44810679"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/44810679/modifying-an-xml-smalldatetime" class="question-hyperlink">Modifying an XML - SMALLDATETIME</a></h3> <div class="excerpt">Hi I am working with XML in SQL server and trying to use the modify function on a SMALLDATETIME variable but it does not give me desired result. DECLARE @Shift_StartDate SMALLDATETIME = '2017-06-05 09:00:00'; DECLARE @Shift_EndDate SMALLDATETIME…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/sql-server" class="post-tag grid--cell" title="show questions tagged 'sql-server'" rel="tag">sql-server</a> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/sql-server-2012" class="post-tag grid--cell" title="show questions tagged 'sql-server-2012'" rel="tag">sql-server-2012</a> <a href="../../questions/tagged/smalldatetime" class="post-tag grid--cell" title="show questions tagged 'smalldatetime'" rel="tag">smalldatetime</a> <a href="../../questions/tagged/xml.modify" class="post-tag grid--cell" title="show questions tagged 'xml.modify'" rel="tag">xml.modify</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jun 28 '17 at 19:08">asked Jun 28 '17 at 19:08</time> <a href="../../users/3046669/brdroid" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/3046669.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="BRDroid" /> </a> <div class="s-user-card--info"> <a href="../../users/3046669/brdroid" class="s-user-card--link">BRDroid</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">3,920</li> <li class="s-award-bling s-award-bling__gold" title="8 gold badges">8</li> <li class="s-award-bling s-award-bling__silver" title="65 silver badges">65</li> <li class="s-award-bling s-award-bling__bronze" title="143 bronze badges">143</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-41386627"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/41386627/sql-in-xml-modify-statement-can-you-use-variable-for-tag-name" class="question-hyperlink">SQL:in XML modify() statement, can you use variable for tag name?</a></h3> <div class="excerpt">I'm trying to do something like: SET @xml.modify ('insert <@x)>@y into (/something)[ID="@id"][1]') I figured out when I replace @y with {sql:variable("@y")}, it worked. But it doesn't work for @x. Is there a way to make it work? </div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/sql" class="post-tag grid--cell" title="show questions tagged 'sql'" rel="tag">sql</a> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/variables" class="post-tag grid--cell" title="show questions tagged 'variables'" rel="tag">variables</a> <a href="../../questions/tagged/tags" class="post-tag grid--cell" title="show questions tagged 'tags'" rel="tag">tags</a> <a href="../../questions/tagged/xml.modify" class="post-tag grid--cell" title="show questions tagged 'xml.modify'" rel="tag">xml.modify</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Dec 29 '16 at 20:18">asked Dec 29 '16 at 20:18</time> <a href="../../users/6273060/hua-deng" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/6273060.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Hua Deng" /> </a> <div class="s-user-card--info"> <a href="../../users/6273060/hua-deng" class="s-user-card--link">Hua Deng</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">21</li> <li class="s-award-bling s-award-bling__bronze" title="4 bronze badges">4</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-28447959"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/28447959/sql-server-2014-query-update-to-insert-xml-node-successful-but-not-inserting-n" class="question-hyperlink">SQL server 2014 query update to insert XML node successful but not inserting node</a></h3> <div class="excerpt">I am trying to complete a homework assignment to create, insert, modify, and xquery a XML table. I've so far been able to create the table and insert some rows of data; however, I am stuck on the modified portion. I have the query created and it…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/sql-server" class="post-tag grid--cell" title="show questions tagged 'sql-server'" rel="tag">sql-server</a> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/xml.modify" class="post-tag grid--cell" title="show questions tagged 'xml.modify'" rel="tag">xml.modify</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 11 '15 at 06:34">asked Feb 11 '15 at 06:34</time> <a href="../../users/4526456/jhg" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/4526456.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="JHG" /> </a> <div class="s-user-card--info"> <a href="../../users/4526456/jhg" class="s-user-card--link">JHG</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">3</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="4 bronze badges">4</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-28438837"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/28438837/using-sql-server-xml-modify-on-an-xm-document-with-escaped-xml" class="question-hyperlink">Using SQL Server xml.modify on an xm document with escaped xml</a></h3> <div class="excerpt">I want to make modifications to an XML document using SQL Server's XML.modify. My problem is my XML document uses some escaped XML so "<" are appearing as "<" and ">" is appearing as ">". I want to know if it would be possible to set the value of an…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/sql-server-2008" class="post-tag grid--cell" title="show questions tagged 'sql-server-2008'" rel="tag">sql-server-2008</a> <a href="../../questions/tagged/xpath" class="post-tag grid--cell" title="show questions tagged 'xpath'" rel="tag">xpath</a> <a href="../../questions/tagged/xml-dml" class="post-tag grid--cell" title="show questions tagged 'xml-dml'" rel="tag">xml-dml</a> <a href="../../questions/tagged/xml.modify" class="post-tag grid--cell" title="show questions tagged 'xml.modify'" rel="tag">xml.modify</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 10 '15 at 18:15">asked Feb 10 '15 at 18:15</time> <a href="../../users/4403218/habeeb-adisa" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/4403218.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Habeeb Adisa" /> </a> <div class="s-user-card--info"> <a href="../../users/4403218/habeeb-adisa" class="s-user-card--link">Habeeb Adisa</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">3</li> <li class="s-award-bling s-award-bling__bronze" title="1 bronze badges">1</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-27399898"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/27399898/use-xml-modify-to-dynamically-create-an-xml-file" class="question-hyperlink">Use xml.modify to dynamically create an XML file</a></h3> <div class="excerpt">I want to dynamically create an XML file using the xml.modify command. I have a table with a column of type xml and I would read that table with a cursor and create an XML file. I'm trying this code just to make some tests but it doesn't…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/xml.modify" class="post-tag grid--cell" title="show questions tagged 'xml.modify'" rel="tag">xml.modify</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Dec 10 '14 at 11:29">asked Dec 10 '14 at 11:29</time> <a href="../../users/3515530/zanza67" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/3515530.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="zanza67" /> </a> <div class="s-user-card--info"> <a href="../../users/3515530/zanza67" class="s-user-card--link">zanza67</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">223</li> <li class="s-award-bling s-award-bling__silver" title="4 silver badges">4</li> <li class="s-award-bling s-award-bling__bronze" title="20 bronze badges">20</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-24819942"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>0</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/24819942/xml-attribute-not-removing-using-xml-modify" class="question-hyperlink">XML attribute not removing using XML.modify</a></h3> <div class="excerpt">My XML is like below. <TDBUIData xmlns="http://www.somedomain.com/pace/r2.4/v1"> <FileCreationDate>2014-07-18T13:21:48.507</FileCreationDate> <TDBUIDataList xmlns=""> <PaceJobNumber>3898646894</PaceJobNumber> <TaskData> …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/sql-server" class="post-tag grid--cell" title="show questions tagged 'sql-server'" rel="tag">sql-server</a> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/xml.modify" class="post-tag grid--cell" title="show questions tagged 'xml.modify'" rel="tag">xml.modify</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jul 18 '14 at 07:56">asked Jul 18 '14 at 07:56</time> <a href="../../users/1490287/mayank-pathak" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1490287.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Mayank Pathak" /> </a> <div class="s-user-card--info"> <a href="../../users/1490287/mayank-pathak" class="s-user-card--link">Mayank Pathak</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">3,621</li> <li class="s-award-bling s-award-bling__gold" title="5 gold badges">5</li> <li class="s-award-bling s-award-bling__silver" title="39 silver badges">39</li> <li class="s-award-bling s-award-bling__bronze" title="67 bronze badges">67</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-57755690"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-3</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/57755690/c-xml-edit-and-add-from-another-xml" class="question-hyperlink">C# XML Edit and Add from another xml</a></h3> <div class="excerpt">both I want to load in C# and compare entries and if they are not present add them, but certain exceptions should not be added. I searched for similar problems but couldn't find a solution to my problem. Modify XML existing content in C# How to…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/c#" class="post-tag grid--cell" title="show questions tagged 'c#'" rel="tag">c#</a> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/edit" class="post-tag grid--cell" title="show questions tagged 'edit'" rel="tag">edit</a> <a href="../../questions/tagged/xml.modify" class="post-tag grid--cell" title="show questions tagged 'xml.modify'" rel="tag">xml.modify</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 02 '19 at 10:53">asked Sep 02 '19 at 10:53</time> <a href="../../users/10436826/joscha-kern" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/10436826.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Joscha Kern" /> </a> <div class="s-user-card--info"> <a href="../../users/10436826/joscha-kern" class="s-user-card--link">Joscha Kern</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">3</li> <li class="s-award-bling s-award-bling__bronze" title="1 bronze badges">1</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/xml.modify_page=1" rel="prev" title="Go to page 1">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/xml.modify_page=1" rel="" title="Go to page 1">1</a> <div class="s-pagination--item is-selected">2</div> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>