0
[![Details of the question][1][1]
I want to make a search button for the ISBN code using Virtual Studio 2013, in which he would return me data from the site ISBNDB.com in XML format, which would be inserted directly into us labels
correspondents, but I’m not getting it. How can I proceed?
[UPDATING]
I was able to get the XML data as follows; 1º installed for data handling was installed the Nuget package "Chilkatdotnet4", then the code for data retrieval:
Private Sub ISBN_btn_Click(sender As Object, e As EventArgs) Handles ISBN_btn.Click
Dim xml0 As New Chilkat.Xml()
' The Chilkat XML component/class is freeware.'
Dim xml As Chilkat.Xml
xml = xml0.HttpGet("http://isbndb.com/api/books.xml?access_key=SUA_CHAVE_DE_ACESSO=isbn&value1=" + ISBN10_txtbox.Text)
If (xml Is Nothing) Then
MsgBox("Livro não encontrado")
Exit Sub
End If
' First, navigate to the BookData node:'
xml.FirstChild2()
xml.FirstChild2()
' Show the Title and AuthorsText: '
ISBN13_txtbox.Text = ISBN13_txtbox.Text & xml.GetAttrValue("isbn13") & vbCrLf
ISBN13_txtbox.Refresh()
Titulo_txtbox.Text = Titulo_txtbox.Text & xml.GetChildContent("Title") & vbCrLf
Titulo_txtbox.Refresh()
TituloLong_txtbox.Text = TituloLong_txtbox.Text & xml.GetChildContent("TitleLong") & vbCrLf
TituloLong_txtbox.Refresh()
Autor_txtbox.Text = Autor_txtbox.Text & xml.GetChildContent("AuthorsText") & vbCrLf
Autor_txtbox.Refresh()
' Show the publisher_id attribute of the PublisherText node:'
Dim xml2 As Chilkat.Xml
xml2 = xml.FindChild("PublisherText")
Editora_txtbox.Text = Editora_txtbox.Text & xml2.GetAttrValue("publisher_id")
' Save the XML to a file:'
xml.SaveXml("book.xml")
End Sub
With this he brings me the data of the search made by ISBN and plays them straight to the text box exactly as he wanted, if not find, an msg appears saying "Book Not Found".
It still has some errors, for example, if some field is manually filled and then put to be done the search, it presents an error. But I’m still analyzing.
Well my doubt now is, how to catch that appear on this link https://www.googleapis.com/books/v1/volumes?q=isbn+8525034304 ? First of all, I tried to use the code above but I think it only works in XML and apparently, this link is another format, so how to proceed..?
User posted a question, after solving edited the question to put another question.
– Jéf Bueno
Good morning @jbueno I see no problem, as long as I haven’t received any answers yet. What he needs is to organize the question, this horrible read :)
– Guilherme Nascimento
Good morning @Guilhermenascimento, but the question has two answers that address only the first problem...
– Jéf Bueno
@jbueno Vixe I had not seen that there were answers, sorry, really does not seem to be correct, maybe a rollback just to the first problem and guide the AP to explain the problem better and/or ask a new question :)
– Guilherme Nascimento
@Guilhermenascimento I think it’s a really good idea (:
– Jéf Bueno
This other format in the googleapis link is [tag:json], @Everton
– brasofilo
@jbueno, that is, needs a little curating here, the section seems very messy... I’m not sure if the votes to close are correct... check out: http://meta.pt.stackoverflow.com/questions/1682/o-que-fazer-quando-o-o-p-muda-sua-question/1684#1684
– brasofilo
I hadn’t come across such a situation before, so I didn’t know what to do. Thanks @brasofilo
– Jéf Bueno
@jbueno, chameleons and vampires are not simply mythical creatures of the Meta :)
– brasofilo
Hello, sorry guys, I did not know q could change the question so out of the blue... Actually I wanted to have left the original question as it was, but I am not allowed to put more than 2 links :(
– Everton Souza Santos
@brasofilo thanks. In this case I should put a new question telling you how to extract the json data for an Aplication form.... right?
– Everton Souza Santos