Xsl

Kaat

Member
Joined
Mar 24, 2005
Messages
22
Location
Belgium
Programming Experience
Beginner
Can someone help me?

Change this xml
VB.NET:
Expand Collapse Copy
[left]<Projects> [/left]
[left]  <Tasks>	 [/left]
[left]	<x>Program</x> [/left]
[left]  </Tasks>[/left]
[left]</Projects>[/left]
[left]
[/left]

to this xml

VB.NET:
Expand Collapse Copy
[left]<Project>[/left]
[left] <Task>[/left]
[left]	 <Y>Program</y>[/left]
[left] </Task>[/left]
[left]</Project>[/left]
by an xsl in VB.NET

greetz
 
Hi, probably you got it wrong ... XSL only formating a XML document and not change the elements inside ... XML XmlTextWriter is one that deal with this.
As i know your problem in details ;) let me know which element you want to change there.

let me try to assume for awhile:

VB.NET:
Expand Collapse Copy
.WriteComment("You should well document the entire code if you want to get higher review")
.WriteStartElement("catalog")
 
.WriteAttributeString("Description", "Parse XML, and Export another XML doc then show by XSL class")
 
.WriteAttributeString("Author", "Kulrom")
 
.WriteStartElement("SchoolProject")
 
[/size][size=2][color=#0000ff]For[/color][/size][size=2][color=#0000ff]Each[/color][/size][size=2] lvItem [/size][size=2][color=#0000ff]In[/color][/size][size=2] lvNodes.Items
 
.WriteElementString("Gender", lvItem.SubItems(0).Text)
 
.WriteElementString("FirstName", lvItem.SubItems(1).Text)
 
.WriteElementString("LastName", lvItem.SubItems(2).Text)
 
[/size][size=2][color=#0000ff]Next[/color][/size]

[size=2][color=#0000ff]{...}[/color][/size]

[size=2][color=#0000ff]
[/color]



VB.NET:
Expand Collapse Copy
[/color]
[/size][size=2].WriteComment("You should well document the entire code if you want to get higher review")
 
.WriteStartElement("AnotherName")
 
.WriteAttributeString("Description", "Parse XML, and Export another XML doc then show by XSL class")
 
.WriteAttributeString("Author", "Kulrom")
 
.WriteStartElement("AnotherName2")
 
[/size][size=2][color=#0000ff]For[/color][/size][size=2][color=#0000ff]Each[/color][/size][size=2] lvItem [/size][size=2][color=#0000ff]In[/color][/size][size=2] lvNodes.Items
 
.WriteElementString("SomethingElse", lvItem.SubItems(0).Text)
 
.WriteElementString("SomethingElse2", lvItem.SubItems(1).Text)
 
.WriteElementString("SomethingElse3", lvItem.SubItems(2).Text)
 
[/size][size=2][color=#0000ff]Next[/color][/size]

[color=#0000ff]{...}[/color]
[size=2][color=#0000ff]


change these also within XSL file respectively ...

Cheers ;)
 
Back
Top