473,396 Members | 2,023 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,396 software developers and data experts.

changing an emelent into an attribute

i have a file like this (which im manipulating using
vb.net)

<CUSTOMERS>
<PRIMARY>Y</PRIMARY>
<SURNAME>BROWN</SURNAME>

which i want to make like this

<CUSTOMERS PRIMARY="Y">
<SURNAME>BROWN</SURNAME>

i dont know whether to this is easy to do using xsl or
whether this is a better way using DOM and Xpath or
something. Any help is greatly appreciated. thanks.
Nov 12 '05 #1
3 1073
XSL and DOM both work. Go with whatever you ( or your team ) feels more
comfortable maintaining going forward.

It;s hard to give a good recommendation on a tiny example. There are many
more factors to consider ..

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

"Raife" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...
i have a file like this (which im manipulating using
vb.net)

<CUSTOMERS>
<PRIMARY>Y</PRIMARY>
<SURNAME>BROWN</SURNAME>

which i want to make like this

<CUSTOMERS PRIMARY="Y">
<SURNAME>BROWN</SURNAME>

i dont know whether to this is easy to do using xsl or
whether this is a better way using DOM and Xpath or
something. Any help is greatly appreciated. thanks.

Nov 12 '05 #2
thanks but im having trouble doing it either way!
-----Original Message-----
XSL and DOM both work. Go with whatever you ( or your team ) feels morecomfortable maintaining going forward.

It;s hard to give a good recommendation on a tiny example. There are manymore factors to consider ..

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

"Raife" <an*******@discussions.microsoft.com> wrote in messagenews:04****************************@phx.gbl...
i have a file like this (which im manipulating using
vb.net)

<CUSTOMERS>
<PRIMARY>Y</PRIMARY>
<SURNAME>BROWN</SURNAME>

which i want to make like this

<CUSTOMERS PRIMARY="Y">
<SURNAME>BROWN</SURNAME>

i dont know whether to this is easy to do using xsl or
whether this is a better way using DOM and Xpath or
something. Any help is greatly appreciated. thanks.

.

Nov 12 '05 #3
can you be more specific? What are you trying to do? Is it something that's
specific to one document format do you need a more generic solution? How big
are the documents that you are processing?

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

<an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
thanks but im having trouble doing it either way!
-----Original Message-----
XSL and DOM both work. Go with whatever you ( or your

team ) feels more
comfortable maintaining going forward.

It;s hard to give a good recommendation on a tiny

example. There are many
more factors to consider ..

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

"Raife" <an*******@discussions.microsoft.com> wrote in

message
news:04****************************@phx.gbl...
i have a file like this (which im manipulating using
vb.net)

<CUSTOMERS>
<PRIMARY>Y</PRIMARY>
<SURNAME>BROWN</SURNAME>

which i want to make like this

<CUSTOMERS PRIMARY="Y">
<SURNAME>BROWN</SURNAME>

i dont know whether to this is easy to do using xsl or
whether this is a better way using DOM and Xpath or
something. Any help is greatly appreciated. thanks.

.

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: martin | last post by:
I needed a way to display calculated, multiple, changing values (numerical sums) as users interacted with the page, and do this without going back to the server to load the page again. What I...
6
by: Boyd Reilly | last post by:
I have a form that has the user pick the type of question he will answer. The input field will be a text, numeric or date type. So, after the question is answered, I need to change the input...
7
by: Frostillicus | last post by:
Hi, I've written some javascript to randomly choose a classical music composer's picture and sample audio and display it on my home page (http://marc.fearby.com/), and this works fine in Mozilla...
6
by: Henry | last post by:
How can I change the text in a link, originally displayed with the "text-decoration:none" attribute to display an underline during the onMouseOver event, and back to its original (non-underlined)...
4
by: multimatum2 | last post by:
Hello, I need to enable/disable input text forms... But... I need to have the same style (color...) in both modes.. Could you help me ? Thanx a lot A small sample... ...
16
by: chris | last post by:
im new to javascript but slowly getting better what i want to do is have some text on the screen and when an event happens for example click a button the text would change to what i want. how...
2
by: clres | last post by:
Hi, I have an XSLT that needs to adjust height and width attributes of images. It sets the width to a particular value and should adjust the height correspondingly. I cannot seem to get it to...
2
by: Paolo Pignatelli | last post by:
I am trying to get an output/file like this (below) in an XML file (MyXmlFile.xml) (which I will use for a slide show) -- <gallery timer="3" order="sequential" fadetime="2" looping="yes"...
12
by: GaryDean | last post by:
In the original post I failed so indicate that I am using framework 1.1....... I need to be able to change the background color of a page from code. I found an answer to this question in...
4
by: libsfan01 | last post by:
hey this code wont work for my iframe in safari, i cant change the page by changing the src with js: <script language="javascript"> function loadcontent(page) {...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.