<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
In Java you can do something like this, creating a
ByteArrayOutputStream and then displaying that stream back as a String.<br>
<br>
<br>
&nbsp;ByteArrayOutputStream bos = new ByteArrayOutputStream();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; byte[] byteBuffer = new byte[1024];<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int numBytes = byteReader.Read(byteBuffer, 1024);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while(numBytes &gt; 0)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bos.write(byteBuffer, 0, numBytes);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; numBytes = byteReader.Read(byteBuffer, 1024);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(bos.toByteArray());<br>
<br>
<br>
or you can get straight XML back from the MgByteReader, and then parse
that:<br>
<br>
&nbsp; MgByteReader byteReader =
resourceService.EnumerateResources(resId,-1,MgResourceType.MapDefinition);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String xml = byteReader.ToString();<br>
&nbsp;&nbsp; //&nbsp; ...parse the xml via the DOM<br>
<br>
hope this helps<br>
-scott<br>
<br>
Scott Hameister wrote:
<blockquote cite="mid00c101c71e41$e7968f60$18d167d1@domain.local"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName">
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
  </style></o:SmartTagType>
  <div class="Section1">
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">Did that,
but I get an MgByteReader object
with no clue how to iterate&#8230;isn&#8217;t there a count/getitem method I
could use or do I have to convert to a string and Parse or something?<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;"><o:p>&nbsp;</o:p></span></font></p>
  <div>
  <div class="MsoNormal" style="text-align: center;" align="center"><font
 face="Times New Roman" size="3"><span style="font-size: 12pt;">
  <hr tabindex="-1" align="center" size="2" width="100%"></span></font></div>
  <p class="MsoNormal"><b><font face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font
 face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma;"> Dave Wilson
[<a class="moz-txt-link-freetext" href="mailto:dave.wilson@autodesk.com">mailto:dave.wilson@autodesk.com</a>] <br>
  <b><span style="font-weight: bold;">Sent:</span></b> Tuesday,
December 12, 2006
4:54 PM<br>
  <b><span style="font-weight: bold;">To:</span></b> <st1:PersonName
 w:st="on"><a class="moz-txt-link-abbreviated" href="mailto:users@mapguide.osgeo.org">users@mapguide.osgeo.org</a></st1:PersonName><br>
  <b><span style="font-weight: bold;">Subject:</span></b> RE:
[mapguide-users]
Finding list of Mapdefinitions</span></font><o:p></o:p></p>
  </div>
  <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font color="blue" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: blue;">Try
MapDefinition</span></font><o:p></o:p></p>
  <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;">&nbsp;<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="blue" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: blue;">Case
sensitive.</span></font><o:p></o:p></p>
  <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;">&nbsp;<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="blue" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: blue;">:)</span></font><o:p></o:p></p>
  <div class="MsoNormal" style="text-align: center;" align="center"><font
 face="Times New Roman" size="3"><span style="font-size: 12pt;">
  <hr tabindex="-1" align="center" size="2" width="100%"></span></font></div>
  <p class="MsoNormal" style="margin-bottom: 12pt;"><b><font
 face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font
 face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma;"> Scott
Hameister [<a class="moz-txt-link-freetext" href="mailto:ScottH@mPower-tech.com">mailto:ScottH@mPower-tech.com</a>] <br>
  <b><span style="font-weight: bold;">Sent:</span></b> Tuesday,
December 12, 2006
3:53 PM<br>
  <b><span style="font-weight: bold;">To:</span></b> <st1:PersonName
 w:st="on"><a class="moz-txt-link-abbreviated" href="mailto:users@mapguide.osgeo.org">users@mapguide.osgeo.org</a></st1:PersonName><br>
  <b><span style="font-weight: bold;">Subject:</span></b>
[mapguide-users] Finding list
of Mapdefinitions</span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">Pulling my
Hair out I&#8217;m just trying
to get a list of Mapdefinitions in the Library:\\<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">I tried
doing EnumerateResources on
Library\\: with -1 and Mapdefinition, but can&#8217;t find an API way to get
the names&#8230;.Am I way off target here?<o:p></o:p></span></font></p>
  </div>
</blockquote>
</body>
</html>