Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Convert Byte array to XML

Posted on 2004-08-09
2
Medium Priority
?
1,143 Views
Last Modified: 2010-05-18
Hi,

I have created a PDF document using a third party component and I can get the results as a Byte Array. I now need to add this to a xml document to be returned from a webservice. How do I go about this? I have looked at serialization but can't get my head around it!

Is my best method to save the PDF to a file and then read it into the XML of is there another method?

Either way, how is it done?

Thanks,

Smert
0
Comment
Question by:smert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 1500 total points
ID: 11754703
well if you have it in a byte array ...

just to get Document ...

public function GetDocument(byval name as string) as byte ()
      return InternalGetDocument(name)
end function

that can be used as a webmethod to return the document without issue ...

If you would rather read it as if it were a stream you can use ...

Dim ms as MempryStream = new MemoryStream(InternalGetDocument(name))

then you can access it with a streamreader etc ...
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question