Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3309354
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:37:50+00:00 2026-05-17T21:37:50+00:00

ASP.net web method: [WebMethod()] public Data.Subtitle[] GetAll() { return Data.Subtitle.FindAll(); } Here’s the Subtitle

  • 0

ASP.net web method:

[WebMethod()]
public Data.Subtitle[] GetAll()
{
    return Data.Subtitle.FindAll();
}

Here’s the Subtitle class:

[ActiveRecord("Subtitle")]
public class Subtitle : ActiveRecordBase<Subtitle>
{
    [PrimaryKey(PrimaryKeyType.Assigned)]
    public int SubId {get;set;}

    [Property()]
    public int SubStreamId {get;set;}

    [Property()]
    public string SubTimeStart {get;set;}

    [Property()]
    public string SubTimeEnd {get;set;}

    [Property()]
    public string SubText {get;set;}

    public Subtitle () { }
}

And here’s the XML coming back:

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfSubtitle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
  <Subtitle>
    <SubId>862</SubId>
    <SubStreamId>1</SubStreamId>
    <SubTimeStart>00:01:04.4450000</SubTimeStart>
    <SubTimeEnd>00:01:08.2450000</SubTimeEnd>
    <SubText>Wikus van de Merwe
MNU Alien Affairs

</SubText>
  </Subtitle>
  <Subtitle>
    <SubId>863</SubId>
    <SubStreamId>1</SubStreamId>
    <SubTimeStart>00:02:11.3430000</SubTimeStart>
    <SubTimeEnd>00:02:14.8430000</SubTimeEnd>
    <SubText>Sarah Livingstone
Sociologist, Kempton Park University

</SubText>
</Subtitle>

I love the simplicity of presenting the data objects as a webservice with one line of code, but I can’t seem to get the array of Subtitle objects serialized without the “ArrayOf” prefix. My trips through Google have pointed me to WCF facilities that aren’t available on Mono, or manual serialization, which I am trying to avoid.

Is there an easy way to present the array of Subtitle objects as <Subtitles> in Mono?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:37:51+00:00Added an answer on May 17, 2026 at 9:37 pm

    for the record :i use a dirt trick, In my example the xml is serialized then parsed as string, so i am managing a string that contain a xml

    var arr = myStr.Split(new char[] {'\n'}, StringSplitOptions.None);
    var arr2 = "";
    for (int i = 2; i < arr.Count()-1;i++ )
    {
        arr2 += arr[i];
    }
    

    it cut the lines 0 (xml),1 (arrayofsubtitle) and last (/arrayofsubtitle):

    :-3

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.