You are currently viewing the XML section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
Hi this is my first stab at XML. I am not sure if I should be posting this in a VB forum or hte XML forum. Either way,direct me.
I want to create the following XML output below in VB. I know I can use the the .WriteStartElement method and the WriteEndElement method. However it can get confusing in your VBA code.
I have provided an example which I can relate to refering to a VBA code hierachy. How would I program this in VB?
<xml version="1.0"encoding = "utf-8"standalone="yes">
<Code>
<Modtype name = "Regular">
<Declarations>
<Declaration name = "Top">
<Snippet name = "Unkown">
<LinesOfCode = "50"/>
</Snippet>
</Declaration>
</Declarations>
<Procedures>
<Procedure name = "Sub">
<Snippet name = "Sub Thing()">
<LinesOfCode = "100"/>
</Snippet>
<Snippet name = "Sub Other()">
<LinesOfCode = "200"/>
</Snippet>
</Procedure>
<Procedure name = "Function">
<Snippet name = "Function Thing()">
<LinesOfCode = "400"/>
</Snippet>
<Snippet name = "Function Other()">
<LinesOfCode = "500"/>
</Procedure>
<Procedure name = "Event">
<Snippet name = "ClickEvent()">
<LinesOfCode = "700"/>
<RangeVariables = "True"/>
</Snippet>
<Snippet name = "MouseOverEvent()">
<LinesOfCode = "800"/>
</Snippet>
</Procedure>
</Procedures>
</Modtype>
[FONT='Arial','sans-serif']</Code>
[/font]