I would like to use yahoo finance to get stock prices.
The yahoo finance webservice return xml and I would like to get the xsd of this xml to create Java objects whose represent xml.
I don't find the xsd of this table.
So my question is simple: do you know where I can find this xsd (if it exists) ?
Thanks
Unfortunately I do not have yahoo finance xsd for you
But if your development environment is Windows I can offer a way which it may help you.
I know you are Java
person and you probably don't like Microsoft
. In .net
we have xsd.exe
tool. (Probably there must be java equivalent for this tool but i do not know about it, so I will explain with xsd.exe
)
Here you can find the detailed explanation for xsd.exe
tool
http://msdn.microsoft.com/en-us/library/x6c1kb0s%28v=vs.100%29.aspx
with this tool you can generate xsd file from your sample xml. After some small modification in this xsd file you can have compatible xml schema
with you xml
The key point is in generated xml will define all types in xs:string
you need to change this types with correct types or you can keep it as it is.
Second important point is generated xml schema can have maxoccurs="unbounded"
. You need to change this value to maxoccurs="1"
for non repeating nodes
You can download latest Microsoft Windows SDK for Windows 7 and .NET Framework 4 form http://www.microsoft.com/en-us/download/details.aspx?id=8279
even if you have older version of this tool you can use it. There is no much change happened since xsd.exe
launced
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.