How can i add videos into xml file?

Ghost

Active Coder
Moderator
Apr 19, 2019
317
142
43
I want to add videos(various sites not only youtube)into xml file?How can i do that?
I think we will need more information from you.
What languages do you already know / are you willing to use for this?
What format are the videos in right now? For example, are they stored in JSON, or in a database, or something else?
 

Turkuaz

New Coder
Aug 19, 2019
2
0
1
I think we will need more information from you.
What languages do you already know / are you willing to use for this?
What format are the videos in right now? For example, are they stored in JSON, or in a database, or something else?
i am interested in php,java,c#,javascript
But I don't know advanced programming
I want this to add videos to my blogger site.Because blogger accept only .xml file.
 

TableFlipGod

Active Coder
May 13, 2019
121
25
29
14
i am interested in php,java,c#,javascript
But I don't know advanced programming
I want this to add videos to my blogger site.Because blogger accept only .xml file.
C# Method:
One way to do it is to have the raw link to the video, Example: here

Example:
using System.Net;

private object DownloadVideo(string url)
{
    //Creates a new web client then downloads the url.
    WebClient client = new WebClient();
    var Video = client.DownloadUrl(url);
    
    return Video;
}

//Example usage
var VideoToParse/*Or Whatever*/ = DownloadVideo("https://www.youtube.com/watch?v=N2Y2vQ-1m7M");
//Use if and contains to get the video element, in this case it would be;
//<video style="width: 809px; height: 455px; left: 0px; top: 0px;" tabindex="-1" class="video-stream html5-main-video" controlslist="nodownload" src="blob:https://www.youtube.com/ee8a7116-2134-4cb2-b8be-af6a129d2461"></video>
 

Ghost

Active Coder
Moderator
Apr 19, 2019
317
142
43
Can you show us the format of the XML file for your blog? It'll help us know how to insert the data into the XML file :)
 
D

Dan-Kode

Guest
I want this to add videos to my blogger site.Because blogger accept only .xml file.
I'm 100% sure that Blogger lets you add Videos to your Blog by simply just Posting a Video via a Blog Post or Linking to a Video somewhere on your Site. You can't display Videos using XML. That it will be for RSS and then for the User to view that Video, they'd need an RSS Feed Reader. Again, you cannot add a Video to XML. If you want to add a Video to XML then you'll just need to type in the Link to that Video.

Going back to Blogger again, you can simply just create a Blog Post with that Video. There is no need to use XML just for one Video.