Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

DELETING TAGS ON XML DOCUMENT

Posted on by Microsoft Employee

Hi All,

I have this XML document that is too large. There are certain tags that I would like to remove, the problem is I tried going through the document line by line, but it takes up mot of my time. If not, I might miss some of the tags I want to delete.
Please can someone assist me with this step by step

Thank you in advance

Musa 

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: DELETING TAGS ON XML DOCUMENT

    I have been trying the second option and have watched some videos, they show pasting a Regular Expression, but they don't show how they go about getting the regular expression.

    I am new into this Dynamics 365 Customer Engagement, I am still trying to find my feet.

    Thanks.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: DELETING TAGS ON XML DOCUMENT

    Thank you David for the advice.

    Noted on the element issue, thank you

  • Harshil Shah Profile Picture
    Harshil Shah 290 on at
    RE: DELETING TAGS ON XML DOCUMENT

    Hello Musa Ntuli,

    1. One way of doing this will be create a C# utility and read XML tag by tag and whatever tags which you required write them in new XML file.
    2. Other way will be Format your XML code & paste it in Notepad++ or any good Text editor. Using "Find all" identify all occurrence of XML tag and remove/Replace them.

    Regards,

    Harshil Shah

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: DELETING TAGS ON XML DOCUMENT

    There are various tools that you can use to edit xml documents. If you have a SQL Server, then you can use the SQLXML functions to delete tags.

    See http://www.sqlmusings.com/2009/04/12/sqlxml-how-to-work-with-xml-elements-or-nodes-in-sql-server/  for some examples (note that what you refer to as 'tags' are 'elements')

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans