Karthik Shiraly wrote:Wordpress exposes an XML based API to post blogs or comments. This is inbuilt and does not need any plugins to support it.
A JSON interface would require some kind of 3rd party plugin (I had a quick look in Wordpress 4 source code, and I could find no inbuilt JSON API).
If XML is ok with you, then I can give you information on how to do so from Java, since I've written a java desktop application for my own use that does exactly that.
Paul Clapham wrote:Well, there's a WordPress app for Android so it must be possible. I don't know if it has a published API though.
I also haven't tried the app.
Brian McGowan wrote:I'm currently using jsoup to parse a HTML document. I've loaded it into a Document by using
This in itself returns three elements in the ele list
<li class="second-col"> <label for="ctl00_Content_ctl00_ddlAirline" id="ctl00_Content_ctl00_lblAirline">Airline</label> <select name="ctl00$Content$ctl00$ddlAirline" id="ctl00_Content_ctl00_ddlAirline"> <option selected="selected" value="">Any</option> <option value=""></option> <option value="Aer Lingus">Aer Lingus</option> <option value="Air Canada Aca">Air Canada Aca</option>...............
and so on.
I'm looking to select the first element of the list, and parse the <option value> into an ArrayList<String>.
Anyone know how I can do this?
chris webster wrote:Remember you can use a WHERE clause to include/exclude the records you count. Try "WHERE ... IS NOT NULL".
chris webster wrote:Remember you can use a WHERE clause to include/exclude the records you count. Try "WHERE ... IS NOT NULL".
chris webster wrote:You can use the SQL aggregate function COUNT with a GROUP BY clause, plus a WHERE clause to restrict the search to the URLs you are interested in. More generally, you need to learn some SQL if you are going to work with databases. SQL is immensely powerful and flexible and is designed for relational databases. Learn how to use the right tool for the job and you will find it much easier to achieve your goals.
Campbell Ritchie wrote:I think this would fit better in our databases forum: moving.
Why have you got so many static methods?
Dave Tolls wrote:
Ron McLeod wrote:Take a look at this line and pay attention to the how you are quoting the string values:
stmt.execute("insert into " + tableName + " values (" + page + ",'" + inner + "','" + external + "')");
And then use a PreparedStatement...
Ron McLeod wrote:Take a look at this line and pay attention to the how you are quoting the string values:
stmt.execute("insert into " + tableName + " values (" + page + ",'" + inner + "','" + external + "')");
Ron McLeod wrote:Your database table is probably not getting created because inner is a reserved word - if you want to use it as a column name, you will need to enclose it in back-ticks.
stmt.execute("create table " + tableName + "(page varchar(2083), `inner` varchar(2083), external varchar(2083))");
Paul Clapham wrote:It would help if you posted both the error message and the code which caused the error message. As it stands now, we have to click on a link to an external site to find out that neither of those two are available. Post them both here, that would be easier both for you and for anybody interested in helping.