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

  • SEARCH
  • Home
  • 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 8223011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:31:10+00:00 2026-06-07T14:31:10+00:00

I want to get an attribute from vimeo xml.. here is structure of xml

  • 0

I want to get an attribute from vimeo xml.. here is structure of xml document

<?xml version="1.0" encoding="UTF-8" ?> 
- <rsp generated_in="0.6533" stat="ok">
- <videos on_this_page="15" page="1" perpage="15" total="329">
- <video allow_adds="1" embed_privacy="anywhere" id="3475223" is_hd="0" is_transcoding="0" license="0" privacy="anybody">
  <title>AxDroid - Android on Dell Axim x51v</title> 
  <description>This is my first attempt at installing and running Android on my Dell Axim x51v. Touchscreen and buttons are working! For details please visit: http://axdroid.blogspot.com/</description> 
  <upload_date>2009-03-04 16:14:19</upload_date> 
  <modified_date>2012-07-14 07:03:32</modified_date> 
  <number_of_likes>2</number_of_likes> 
  <number_of_plays>43422</number_of_plays> 
  <number_of_comments>1</number_of_comments> 
  <width>320</width> 
  <height>240</height> 
  <duration>320</duration> 
- <owner display_name="Ertan D." id="1387509" is_plus="0" is_pro="0" is_staff="0" profileurl="http://vimeo.com/user1387509" realname="Ertan D." username="user1387509" videosurl="http://vimeo.com/user1387509/videos">
- <portraits>
  <portrait height="30" width="30">http://a.vimeocdn.com/images_v6/portraits/portrait_30_yellow.png</portrait> 
  <portrait height="75" width="75">http://a.vimeocdn.com/images_v6/portraits/portrait_75_yellow.png</portrait> 
  <portrait height="100" width="100">http://a.vimeocdn.com/images_v6/portraits/portrait_100_yellow.png</portrait> 
  <portrait height="300" width="300">http://a.vimeocdn.com/images_v6/portraits/portrait_300_yellow.png</portrait> 
  </portraits>
  </owner>
- <tags>
  <tag author="1387509" id="8397224" normalized="android" url="http://vimeo.com/tag:android">android</tag> 
  <tag author="1387509" id="8397225" normalized="dell" url="http://vimeo.com/tag:dell">dell</tag> 
  <tag author="1387509" id="8397226" normalized="axim" url="http://vimeo.com/tag:axim">axim</tag> 
  <tag author="1387509" id="8397227" normalized="linux" url="http://vimeo.com/tag:linux">linux</tag> 
  <tag author="1387509" id="8397228" normalized="google" url="http://vimeo.com/tag:google">google</tag> 
  <tag author="1387509" id="8397229" normalized="pda" url="http://vimeo.com/tag:pda">pda</tag> 
  <tag author="1387509" id="8397230" normalized="ppc" url="http://vimeo.com/tag:ppc">ppc</tag> 
  </tags>
- <cast>
  <member display_name="Ertan D." id="1387509" role="" username="user1387509" /> 
  </cast>
- <urls>
  <url type="video">http://vimeo.com/3475223</url> 
  </urls>
- <thumbnails>
  <thumbnail height="75" width="100">http://b.vimeocdn.com/ts/347/807/3478071_100.jpg</thumbnail> 
  <thumbnail height="150" width="200">http://b.vimeocdn.com/ts/347/807/3478071_200.jpg</thumbnail> 
  <thumbnail height="480" width="640">http://b.vimeocdn.com/ts/347/807/3478071_640.jpg</thumbnail> 
  </thumbnails>
  </video>
- <video allow_adds="1" embed_privacy="anywhere" id="28665952" is_hd="1" is_transcoding="0" license="0" privacy="anybody">
  <title>Duygu + Ertan Şıkır Şıkır by DÜĞÜNHİKAYEMİZ</title> 
  <description /> 
  <upload_date>2011-09-06 10:54:49</upload_date> 
  <modified_date>2012-07-14 06:41:33</modified_date> 
  <number_of_likes>3</number_of_likes> 
  <number_of_plays>26214</number_of_plays> 

and I want to get username attribute from owner element. Here is serialization code.

  [XmlTypeAttribute(AnonymousType = true)]
    [XmlRootAttribute(Namespace = "", IsNullable = false, ElementName = "rsp")]
    public partial class VimeoSearchResponse
    {
        private SearchResponseVideosWrapper _videos;
        private string _generated_in;
        private string _stat;

        [XmlElementAttribute("videos", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public SearchResponseVideosWrapper videos
        {
            get { return _videos; }
            set { _videos = value; }
        }
        [XmlAttributeAttribute()]
        public string generated_in
        {
            get { return _generated_in; }
            set { _generated_in = value; }
        }
        [XmlAttributeAttribute()]
        public string stat
        {
            get { return _stat; }
            set { _stat = value; }
        }
    }

    [SerializableAttribute]
    [XmlTypeAttribute(AnonymousType = true)]
    public partial class SearchResponseVideosWrapper
    {
        private SearchResponseVideosWrapperVideo[] _video;
        private string _on_this_page;
        private string _page;
        private string _perpage;
        private string _total;

        [XmlElementAttribute("video", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public SearchResponseVideosWrapperVideo[] video
        {
            get { return _video; }
            set { _video = value; }
        }


        [XmlAttributeAttribute()]
        public string on_this_page
        {
            get { return _on_this_page; }
            set { _on_this_page = value; }
        }
        [XmlAttributeAttribute()]
        public string page
        {
            get { return _page; }
            set { _page = value; }
        }
        [XmlAttributeAttribute()]
        public string perpage
        {
            get { return _perpage; }
            set { _perpage = value; }
        }
        [XmlAttributeAttribute()]
        public string total
        {
            get { return _total; }
            set { _total = value; }
        }
    }

    [SerializableAttribute]
    [XmlTypeAttribute(AnonymousType = true)]
    public partial class SearchResponseVideosWrapperVideo
    {
        private string _title;
        private string _id;
        private string _username;

        [XmlElement()]
        public string title
        {
            get { return _title; }
            set { _title = value; }
        }

        [XmlAttributeAttribute()]
        public string id
        {
            get { return _id; }
            set { _id = value; }
        }

        [XmlElementAttribute("owner")]
        public string username 
        {
            get { return _username; }
            set { _username = value; }
        }        
}

problem is here i think

      [XmlElementAttribute("owner")]
        public string username 
        {
            get { return _username; }
            set { _username = value; }
        }

- <owner display_name="Ertan D." id="1387509" is_plus="0" is_pro="0" is_staff="0" profileurl="http://vimeo.com/user1387509" realname="Ertan D." username="user1387509" videosurl="http://vimeo.com/user1387509/videos">

how can I get attribute from owner..

here is exception detail

I get an exception that is There is an error in XML document (1,
1005).

{“Unexpected node type Element. ReadElementString method can only be
called on elements with simple or empty content. Line 1, position
1005.”}

System.InvalidOperationException was caught

  • 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-06-07T14:31:11+00:00Added an answer on June 7, 2026 at 2:31 pm

    You need an ‘owner’ class. You also might consider adding the ‘portrait’ class with a collection in the ‘owner’ class.

    public class owner
    {
        [XmlAttributeAttribute]
        public string username { get; set; }
    }
    
    
    
    [SerializableAttribute] 
    [XmlTypeAttribute(AnonymousType = true)] 
    public partial class SearchResponseVideosWrapperVideo 
    { 
        private string _title; 
        private string _id; 
        private string _username; 
    
        [XmlElement()] 
        public string title 
        { 
            get { return _title; } 
            set { _title = value; } 
        } 
    
        [XmlAttributeAttribute()] 
        public string id 
        { 
            get { return _id; } 
            set { _id = value; } 
        } 
    
        [XmlElementAttribute("owner")] 
        public owner owner { get; set; }       
    

    }

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

Sidebar

Related Questions

I want to get the highest attribute ID from my XML file. My code:
What I want: get a xml from the AppData to use What I code
I want to get an attribute out of a XML-Tree. Therefor I use the
I have a XML file like this : <?xml version=1.0 encoding=UTF-8 standalone=no ?> <user>
I want to get an attribute from another element. E.g. <xsl:template match=tag1> Test: <xsl:value-of
I'm inside a cfloop over a query. I want to get an attribute, but
I want to get all values of 'id' attribute of 'span' tag with html
I want to get all anchor elements on my page where the attribute rel
I want get as much as possible from Redis + Hiredis + libevent. I'm
Basically I want get data I already have accessed from javascript and passing it

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.