format XML output

T

TNAYFEH

My output to XML function seems to be working but I'm stuck on the
formatting of the file.....I'm trying to add a carriage return for
each node, my code looks like this:

xmldoc.documentElement.appendChild (onode2)
Set inode2 = xmldoc.createNode("element", "platformUser", "")
inode2.setAttribute "platformCode", "COG"
inode2.setAttribute "lid", rs2.fields(1)
inode2.setAttribute "platformUserName", rs2.fields(1)
inode2.setAttribute "appUserName", rs2.fields(0)
onode2.appendChild (inode2)

while the output looks like:

<platformUser platformCode="COG" lid="aroraa5"
platformUserName="aroraa5" appUserName="User, Test">
<privilegeCode>CPG</privilegeCode>
<privilegeCode>ED</privilegeCode>
<privilegeCode>MB</privilegeCode>
</platformUser>

So for each <platformUser>...</platformUser> there should be a line.
Is this easy to do?

Thanks so much in advance!
 
C

Cindy M.

Hi Tnayfeh,
My output to XML function seems to be working but I'm stuck on the
formatting of the file....
Can't figure out what this question is doing in the office.vba
newsgroup, but... Best place to ask is probably the straight XSL
newsgroup, rather than any office newsgroup.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17
2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top