How to integrate with Google APIs and Google's applications (8)----How to convert the JSON schema of Google Blogger (blog) into XML Schema (XSD)?

Source: Internet
Author: User

In the Google RESTFul API, the Google Blogger API (Google Blog API) should be close to our lives, as nearly a lot of people are reading blogs every day and have heard of blogs. In a series of articles in front of Google's application system for integration (5) and Google's Applications for integration (6). We mentioned how to convert the JSON schema of Google Calendar and Google tasks into an XSD schema for XML. Judging by the amount of blog visits, there are a lot of like-minded friends who are interested in this, so this chapter. I continue to dedicate and share how to convert the JSON schema of Google Blogger into XML Schema (XSD). First, let's start by listing the JSON schema for Google Blogger (Https://www.googleapis.com/discovery/v1/apis/blogger/v3/rest)

So. How to convert the JSON schema of Google blogger into an XSD schema for XML? What will the XML schema look like? Please refer to the conversion implementation below.

<?xml version= "1.0" encoding= "UTF-8"?

><xs:schema xmlns:xs= "Http://www.w3.org/2001/XMLSchema" elementformdefault= "qualified" attributeFormDefault = "unqualified" ><xs:complextype name= "Blog" ><xs:sequence><xs:element name= "Custommetadata" type= "Xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "description" type= "xs:string" form= " Unqualified "minoccurs=" 0 "/><xs:element name=" id "type=" xs:string "form=" unqualified "minoccurs=" 0 "/>< Xs:element name= "Kind" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "locale" type= " Locale "form=" unqualified "minoccurs=" 0 "/><xs:element name=" name "type=" xs:string "form=" unqualified " minoccurs= "0"/><xs:element name= "pages" type= "pages" form= "unqualified" minoccurs= "0"/><xs:element name = "Posts" type= "posts" form= "unqualified" minoccurs= "0"/><xs:element name= "published" Type= "Xs:string" form= " Unqualified "minoccurs=" 0 "/><xs:element name=" Selflink "type=" xs:string "form=" unqualified "MINOCCUrs= "0"/><xs:element name= "updated" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "url" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence></xs:complextype><xs: ComplexType name= "BlogList" ><xs:sequence><xs:element name= "Bloguserinfos" type= "Bloguserinfo" form= " Unqualified "minoccurs=" 0 "maxoccurs=" unbounded "/><xs:element name=" items "type=" Blog "form=" unqualified " minoccurs= "0" maxoccurs= "unbounded"/><xs:element name= "Kind" type= "xs:string" form= "unqualified" minoccurs= "0 "/></xs:sequence></xs:complextype><xs:complextype name=" Blogperuserinfo "><xs:sequence ><xs:element name= "BlogId" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= " Hasadminaccess "type=" Xs:boolean "form=" unqualified "minoccurs=" 0 "/><xs:element name=" Kind "type=" xs:string " Form= "unqualified" minoccurs= "0"/><xs:element name= "Photosalbumkey" type= "xs:string" form= "UnqualiFied "minoccurs=" 0 "/><xs:element name=" role "type=" xs:string "form=" unqualified "minoccurs=" 0 "/><xs: Element name= "UserId" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence></xs: Complextype><xs:complextype name= "Bloguserinfo" ><xs:sequence><xs:element name= "blog" type= "blog "form=" unqualified "minoccurs=" 0 "maxoccurs=" unbounded "/><xs:element name=" Blog_user_info "type=" Blogperuserinfo "form=" unqualified "minoccurs=" 0 "maxoccurs=" unbounded "/><xs:element name=" kind "type=" xs: String "form=" unqualified "minoccurs=" 0 "/></xs:sequence></xs:complextype><xs:complextype name=" Blogimages "><xs:sequence><xs:element name=" items "type=" Blogitems "form=" unqualified "minoccurs=" 0 " maxoccurs= "unbounded"/></xs:sequence></xs:complextype><xs:complextype name= "Blogitems" > <xs:sequence><xs:element name= "url" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs: Sequence></xs:complextype><xs:complextype name= "Comment" ><xs:sequence><xs:element name= "author" type= " Author "form=" unqualified "minoccurs=" 0 "/><xs:element name=" blog "type=" blog "form=" unqualified "minoccurs=" 0 " /><xs:element name= "Content" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "id" Type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "Inreplyto" type= "Inreplyto" form= " Unqualified "minoccurs=" 0 "/><xs:element name=" Kind "type=" xs:string "form=" unqualified "minoccurs=" 0 "/> <xs:element name= "POST" type= "POST" form= "unqualified" minoccurs= "0"/><xs:element name= "published" Type= "XS : string "form=" unqualified "minoccurs=" 0 "/><xs:element name=" Selflink "type=" xs:string "form=" unqualified " minoccurs= "0"/><xs:element name= "status" type= "Xs:string" form= "unqualified" minoccurs= "0"/><xs: Element Name= "updated" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence></xs:complextype><xs:complextype name= "commentlist" ><xs:sequence><xs:element name= "items" type= " Comment "form=" unqualified "minoccurs=" 0 "maxoccurs=" unbounded "/><xs:element name=" Kind "type=" xs:string "form = "unqualified" minoccurs= "0"/><xs:element name= "Nextpagetoken" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "Prevpagetoken" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence ></xs:complextype><xs:complextype name= "page" ><xs:sequence><xs:element name= "author" type = "Author" form= "unqualified" minoccurs= "0"/><xs:element name= "blog" type= "blog" form= "unqualified" minoccurs= " 0 "/><xs:element name=" content "type=" xs:string "form=" unqualified "minoccurs=" 0 "/><xs:element name=" id " Type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "Kind" type= "xs:string" form= "unqualified "minoccurs=" 0 "/><xs:element name=" published "Type=" xs:string "form=" UnqualiFied "minoccurs=" 0 "/><xs:element name=" Selflink "type=" xs:string "form=" unqualified "minoccurs=" 0 "/><xs : element name= "status" type= "Xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "title" Type= "xs: String "form=" unqualified "minoccurs=" 0 "/><xs:element name=" updated "type=" xs:string "form=" unqualified " minoccurs= "0"/><xs:element name= "url" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence ></xs:complextype><xs:complextype name= "pagelist" ><xs:sequence><xs:element name= "items" Type= "page" form= "unqualified" minoccurs= "0" maxoccurs= "unbounded"/><xs:element name= "Kind" type= "xs:string" Form= "unqualified" minoccurs= "0"/></xs:sequence></xs:complextype><xs:complextype name= " Pageviews "><xs:sequence><xs:element name=" blogId "type=" xs:string "form=" unqualified "minoccurs=" 0 "/ ><xs:element name= "Counts" type= "Pageviewsitems" form= "unqualified" minoccurs= "0" maxoccurs= "UnBounded "/><xs:element name=" Kind "type=" xs:string "form=" unqualified "minoccurs=" 0 "/></xs:sequence> </xs:complextype><xs:complextype name= "pageviewscounts" ><xs:sequence><xs:element name= " Items "type=" Pageviewsitems "form=" unqualified "minoccurs=" 0 "maxoccurs=" unbounded "/></xs:sequence></ Xs:complextype><xs:complextype name= "Pageviewsitems" ><xs:sequence><xs:element name= "Count" type = "Xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "Timerange" type= "xs:string" form= " Unqualified "minoccurs=" 0 "/></xs:sequence></xs:complextype><xs:complextype name=" Post ">< Xs:sequence><xs:element name= "Author" type= "author" form= "unqualified" minoccurs= "0"/><xs:element name= "Blog" type= "blog" form= "unqualified" minoccurs= "0"/><xs:element name= "content" type= "xs:string" form= " Unqualified "minoccurs=" 0 "/><xs:element name=" Custommetadata "type=" xs:string "form=" unqualified "minoccurs= "0"/><xs:element name= "id" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= " Images "type=" blogimages "form=" unqualified "minoccurs=" 0 "maxoccurs=" unbounded "/><xs:element name=" kind "type = "Xs:string" form= "unqualified" minoccurs= "0"/> <xs:element name= "labels" form= "Unqualifie D "type=" xs:string "minoccurs=" 0 "maxoccurs=" unbounded "/><xs:element name=" Location "type=" Location "form=" Unqualified "minoccurs=" 0 "/><xs:element name=" published "Type=" xs:string "form=" unqualified "minoccurs=" 0 "/ ><xs:element name= "replies" Type= "replies" form= "unqualified" minoccurs= "0"/><xs:element name= "SelfLink "Type=" xs:string "form=" unqualified "minoccurs=" 0 "/><xs:element name=" status "type=" Xs:string "form=" Unqualified "minoccurs=" 0 "/><xs:element name=" title "Type=" Xs:string "form=" unqualified "minoccurs=" 0 "/> <xs:element name= "Titlelink" type= "xs:string" form= "unqualified" minoccurs= "0"/><Xs:element name= "Updated" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "url" type= "xs: String "form=" unqualified "minoccurs=" 0 "/></xs:sequence></xs:complextype><xs:complextype name=" Postlist "><xs:sequence><xs:element name=" items "type=" Post "form=" unqualified "minoccurs=" 0 "maxoccurs= "Unbounded"/><xs:element name= "Kind" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element Name= "Nextpagetoken" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence></xs: Complextype><xs:complextype name= "Postperuserinfo" ><xs:sequence><xs:element name= "BlogId" type= "Xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "haseditaccess" type= "Xs:boolean" form= " Unqualified "minoccurs=" 0 "/><xs:element name=" Kind "type=" xs:string "form=" unqualified "minoccurs=" 0 "/> <xs:element name= "PostID" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "userId "type=" xs:string "form=" unqualified "minoccurs=" 0 "/></xs:sequence></xs:complextype><xs: ComplexType name= "Postuserinfo" ><xs:sequence><xs:element name= "Kind" type= "xs:string" form= " Unqualified "minoccurs=" 0 "/><xs:element name=" POST "type=" POST "form=" unqualified "minoccurs=" 0 "maxoccurs=" Unbounded "/><xs:element name=" Post_user_info "type=" Postperuserinfo "form=" unqualified "minoccurs=" 0 " maxoccurs= "unbounded"/></xs:sequence></xs:complextype><xs:complextype name= "PostUserInfosList "><xs:sequence><xs:element name=" items "type=" Postuserinfo "form=" unqualified "minoccurs=" 0 "maxoccurs= "Unbounded"/><xs:element name= "Kind" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element Name= "Nextpagetoken" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence></xs: Complextype><xs:complextype name= "User" ><xs:sequence><xs:element name= "about" type= "xs:string" Form= "Unqualified "minoccurs=" 0 "/><xs:element name=" blogs "type=" blogs "form=" unqualified "minoccurs=" 0 "/><xs: Element Name= "created" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "DisplayName" type= "Xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "id" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "Kind" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element Name= "locale" type= "locale" form= "unqualified" minoccurs= "0"/><xs:element name= "Selflink" type= "xs:string" Form= "unqualified" minoccurs= "0"/><xs:element name= "url" type= "xs:string" form= "unqualified" minoccurs= "0"/ ></xs:sequence></xs:complextype><xs:complextype name= "Author" ><xs:sequence><xs: Element name= "DisplayName" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "id" type= "xs: String "form=" unqualified "minoccurs=" 0 "/><xs:element name=" image "type=" image "form=" UnqualifIED "minoccurs=" 0 "/><xs:element name=" url "type=" xs:string "form=" unqualified "minoccurs=" 0 "/></xs: Sequence></xs:complextype><xs:complextype name= "blog" ><xs:sequence><xs:element name= "id" Type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence></xs:complextype><xs: ComplexType name= "Blogs" ><xs:sequence><xs:element name= "Selflink" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence></xs:complextype><xs:complextype name= "image" ><xs:sequence ><xs:element name= "url" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence></xs: Complextype><xs:complextype name= "Inreplyto" ><xs:sequence><xs:element name= "id" type= "xs:string "form=" unqualified "minoccurs=" 0 "/></xs:sequence></xs:complextype><xs:complextype name=" locale "><xs:sequence><xs:element name=" Country "type=" xs:string "form=" unqualified "minoccurs=" 0 "/>&Lt;xs:element name= "Language" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "variant" Type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence></xs:complextype><xs: ComplexType name= "Location" ><xs:sequence><xs:element name= "lat" type= "xs:double" form= "unqualified" minoccurs= "0"/><xs:element name= "LNG" type= "xs:double" form= "unqualified" minoccurs= "0"/><xs:element Name= "name" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "span" type= "xs:string" form= " Unqualified "minoccurs=" 0 "/></xs:sequence></xs:complextype><xs:complextype name=" pages "> <xs:sequence><xs:element name= "Selflink" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs: Element name= "TotalItems" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs:sequence></xs: Complextype><xs:complextype name= "POST" ><xs:sequence><xs:element name= "id" type= "xs:string" forM= "unqualified" minoccurs= "0"/></xs:sequence></xs:complextype><xs:complextype name= "Posts" > <xs:sequence><xs:element name= "Items" type= "Post" form= "unqualified" minoccurs= "0" maxoccurs= "unbounded"/ ><xs:element name= "Selflink" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= " TotalItems "type=" xs:string "form=" unqualified "minoccurs=" 0 "/></xs:sequence></xs:complextype>< Xs:complextype name= "replies" ><xs:sequence><xs:element name= "items" type= "Comment" form= "unqualified" minoccurs= "0" maxoccurs= "unbounded"/><xs:element name= "Selflink" type= "xs:string" form= "unqualified" minoccurs= "0"/><xs:element name= "TotalItems" type= "xs:string" form= "unqualified" minoccurs= "0"/></xs: Sequence></xs:complextype><xs:element name= "blog" type= "blog"/><xs:element name= "BlogList" type= "BlogList"/><xs:element name= "Blogperuserinfo" type= "Blogperuserinfo"/><xs:element name= "BlOguserinfo "type=" Bloguserinfo "/><xs:element name=" Comment "type=" Comment "/><xs:element name=" Commentlist "type=" commentlist "/><xs:element name=" page "type=" page "/><xs:element name=" PageList "type= "PageList"/><xs:element name= "pageviews" type= "pageviews"/><xs:element name= "POST" type= "post"/> <xs:element name= "postlist" type= "postlist"/><xs:element name= "Postperuserinfo" type= "PostPerUserInfo"/ ><xs:element name= "Postuserinfo" type= "Postuserinfo"/><xs:element name= "PostUserInfosList" type= " Postuserinfoslist "/><xs:element name=" user "type=" user "/></xs:schema>


How to integrate with Google APIs and Google's applications (8)----How to convert the JSON schema of Google Blogger (blog) into XML Schema (XSD)?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.