Click here to Skip to main content
15,921,643 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralLearning web services Pin
Goodway22-Jun-05 23:17
Goodway22-Jun-05 23:17 
GeneralRe: Learning web services Pin
Michael A. Barnhart23-Jun-05 11:55
Michael A. Barnhart23-Jun-05 11:55 
Generalroot element is missing Pin
Ahmed Galal21-Jun-05 23:04
Ahmed Galal21-Jun-05 23:04 
GeneralRe: root element is missing Pin
DavidNohejl22-Jun-05 7:33
DavidNohejl22-Jun-05 7:33 
GeneralRe: root element is missing Pin
Ahmed Galal22-Jun-05 12:53
Ahmed Galal22-Jun-05 12:53 
GeneralRe: root element is missing Pin
DavidNohejl22-Jun-05 12:58
DavidNohejl22-Jun-05 12:58 
GeneralRe: root element is missing Pin
Ahmed Galal22-Jun-05 13:04
Ahmed Galal22-Jun-05 13:04 
Generalconfused Pin
Anonymous21-Jun-05 3:41
Anonymous21-Jun-05 3:41 
I'm trying to write a C++ (MFC) program that updates an XML file. I originally just wanted to write my C++ program to deal with the code itself, but then I started updating it to work with special cases and the code got messy. I was told to use an XML parser and since MSXML appears to be already installed on my computer I decided to go with that. The problem is, all the tutorials I found are confusing because they include a lot of unnecessary tasks that would be useful for programs that work with XML files extensively but not for mine. The fact that oftentimes they just show the whole code and say what its final result is doesn't help much either.

I figured out how to create a parser instance and open up a file, but that's as far as I got. My program just needs to update some settings for some tags. For example if the xml file is something like:

<first Value="0"><br />
...<br />
</first><br />
...<br />
<second Value="1"><br />
<subsecond OtherValue="0"><br />
...<br />
</subsecond><br />
<subsecond OtherValue="0"><br />
...<br />
</subsecond><br />
<subsecond OtherValue="0"><br />
...<br />
</subsecond><br />
</second>


I just need to get it to look for all isntance of that "first" tag and change its "Value" to 2, then for all instances of "second" tag I need to change it's "Value" to say 3, and also inside every "second" tag I would need to change "OtherValue" setting just for the second occurance of "subsecond" and not for any others. So that the output would end up being something like:

<first Value="2"><br />
...<br />
</first><br />
...<br />
<second Value="3"><br />
<subsecond OtherValue="0"><br />
...<br />
</subsecond><br />
<subsecond OtherValue="1"><br />
...<br />
</subsecond><br />
<subsecond OtherValue="0"><br />
...<br />
</subsecond><br />
</second>


Any help or a link to a tutorial that would actually cause more good than harm would be greatly appreciated, thanks.
GeneralRe: confused Pin
Anonymous21-Jun-05 3:47
Anonymous21-Jun-05 3:47 
Questionhow to contract empty tag &lt;col&gt;&lt;/col&gt; to &lt;col/&gt; in XSLT Pin
Lyteck21-Jun-05 1:54
Lyteck21-Jun-05 1:54 
AnswerRe: how to contract empty tag &lt;col&gt;&lt;/col&gt; to &lt;col/&gt; in XSLT Pin
Javier Lozano22-Jun-05 11:48
Javier Lozano22-Jun-05 11:48 
GeneralRe: how to contract empty tag &lt;col&gt;&lt;/col&gt; to &lt;col/&gt; in XSLT Pin
Lyteck27-Jun-05 3:13
Lyteck27-Jun-05 3:13 
GeneralLoading custom control from XSLT Pin
randomnumber21-Jun-05 0:59
randomnumber21-Jun-05 0:59 
GeneralXSD Problem Pin
matt cole20-Jun-05 16:06
matt cole20-Jun-05 16:06 
GeneralXSD Problem Pin
Chetan Ranpariya13-Jul-05 22:29
Chetan Ranpariya13-Jul-05 22:29 
GeneralProblem creating working XSD with restrictions Pin
clatten20-Jun-05 1:42
clatten20-Jun-05 1:42 
GeneralProblem Creating XML [SOLVED] Pin
Paolo Ponzano20-Jun-05 0:16
Paolo Ponzano20-Jun-05 0:16 
QuestionWhy do i allways get the same value? Pin
shapper18-Jun-05 12:57
shapper18-Jun-05 12:57 
QuestionIs this possible ? Pin
Wilbur J. Pereira18-Jun-05 0:38
Wilbur J. Pereira18-Jun-05 0:38 
GeneralXML As Database Pin
Gaurang Desai17-Jun-05 22:45
Gaurang Desai17-Jun-05 22:45 
GeneralRe: XML As Database Pin
Ahmed Galal22-Jun-05 12:57
Ahmed Galal22-Jun-05 12:57 
Generalsetting the parameter value based on condition Pin
D.Sridhar17-Jun-05 10:38
D.Sridhar17-Jun-05 10:38 
GeneralSuitability of XML Pin
Anonymous17-Jun-05 5:50
Anonymous17-Jun-05 5:50 
GeneralRe: Suitability of XML Pin
DavidNohejl17-Jun-05 5:58
DavidNohejl17-Jun-05 5:58 
QuestionHow to improve my code? Thank You. Pin
shapper17-Jun-05 5:31
shapper17-Jun-05 5:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.