473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to move around a XML node using C# or Linq

1
I want to move a node around in XML

for e.g. if the string is

<strong><u><?custom_mark_start ForFormatCount='BU' Forunformatchar='i' data='evolved'?>evolved<?custom_format_mark_end ?></u></strong>

then the custom PI should be moved before the formatting tags

The Result should be

<?custom_mark_start ForFormatCount='BU' Forunformatchar='i' data='evolved'?><strong><u>evolved</u></strong><?custom_format_mark_end ?>

I need to do this for the Entire XML file.

Can we do it with Regex or Linq?
Sep 12 '12 #1
1 2189
Frinavale
9,735 Expert Mod 8TB
Not sure if this is useful for a string, but I would look into using the XmlDocument class to help me manage XML nodes.

-Frinny
Oct 25 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Scott Simpson | last post by:
Can you query from a non-root node using XPathAPI's function selectNodeList(Node contextNode, java.lang.String str)? I'm trying this using the XPath expression "//*" and I'm getting nothing back. I...
6
by: Eddy C | last post by:
Hi, I'm trying to get the value of another node using the position of another node or the name of the tag. Such that the current node is one of the contacts child nodes sec or prim and doing...
1
by: eddie wang | last post by:
How to move around a picture file dynamically in an asp page? Any link to sample code will be great. Thanks. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate...
0
JaneDoe
by: JaneDoe | last post by:
hi I am writing a classic asp page. I want to move a node with children to a cookie, but cannot figure out how to put in the cookie. Then I want to read the cookie and re-use the xml. below is my...
4
by: Lacutas | last post by:
Hi all, I am having some problems using LINQ to access Distinct records from a Dataset. I have looked around and believe it should be as simple as added .Distinct() to my LINQ query below, though...
3
by: Ilyas | last post by:
Hi all What is the recommended way for using Linq within a 3 Tier project? Many thanks
2
by: nasayoo | last post by:
I am doing my project using LINQ to SQL technology for the database part. I wrote the coding for inserting a new record into the table. The coding was ok. Its working 100%. But after inserting the...
7
by: shapper | last post by:
Hello, Is it possible to multiply all Prices in a List<Productby 1.1 using Linq? Product has a property named Price. Thanks, Miguel
2
by: Big Daddy | last post by:
For example, if I have a DB table called DownloadPoints with a column named DownloadPointNo, then SqlMetal will create a file with a class called DownloadPoints with an accessor named...
0
by: Big Daddy | last post by:
I am trying to do all my DB access through LINQ. For example, I am trying to delete a record from the JobQueue table. There’s a couple ways I could do this: 1. Method 1 – The disadvantage is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.