-
Jul 14th, 2019, 09:42 PM
#1
Thread Starter
Addicted Member
Xml modify root
<data>
<datainfo>
<time>2015/12/9 15:25:49</time>
<count>0</count>
</datainfo>
<dataitems>
</dataitems>
</data>
If you want to modify it to:
<data test="123">
<datainfo>
<time>2015/12/9 15:25:49</time>
<count>0</count>
</datainfo>
<dataitems>
</dataitems>
</data>
Excuse me, if you use SQL to achieve?
Here are the answers that can be used after the test:
I use modify to solve the problem:
SET@x.modify('insert attribute erpid {"right"} into (/root) [1]')
Select@x;
Last edited by ChenLin; Jul 15th, 2019 at 06:57 PM.
Reason: Publishing answers is easy for others to use
QQ: 289778005
-
Jul 15th, 2019, 06:52 AM
#2
Re: Xml modify root
I would do a search for SQL XML add attribute and see what comes up.
-tg
-
Jul 15th, 2019, 06:52 PM
#3
Thread Starter
Addicted Member
Re: Xml modify root
thank you @techgnome,
I use Modify:
SET @x.modify('insert attribute erpid {"right"} into (/root)[1]')
select @x;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|