• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 772
  • Last Modified:

How best to return XML from a function (VB .net 2003, 7.1)

Hi,
I'm writing a VB (.net 2003, 7.1) application. It is to return XML, maybe several thousand lines worth. Not really a huge amount of data. (The receiving function may just write the XML out to a file, I don't know, not my job). I could have VB return an array of Strings but I'm wondering if there is any better ways to returning this type of data. Not binary, just ASCII lines. I've "heard" about streaming but know NOTHING about it. So I leave it up to the experts to advise me as to a better way to return XML like data. Maybe an array of Strings is the best way. Details are appreciated. Let me know!!

Dave P
0
aerol
Asked:
aerol
2 Solutions
 
DarrenSenior Software EngineerCommented:
Hi,

You could return a string object
You could return an XMLDocument object.

There are loads of ways of returning it.

Do you also have to build the XML from raw data?

Darren

0
 
tpwellsCommented:
I would save the xml to a memory stream and pass the memory stream back. You work with the memory stream as you would a file stream.

System.IO.MemoryStream
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now