Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


aboylikedave

243 posts

Master Geek
+1 received by user: 4


#142950 29-Mar-2014 21:37
Send private message

Hi

I have HTML but no coding experience but have decided to learn in order to accomplish a personal project I have a need for. I need to take an XML feed and turn it into an HTML table on a webpage (could be local as it is just for me).  I also need to be able to add some code to hide certain rows of the table based on user specified paramours (e.g. if user selects 'x' it will hide row beginning x).

I'm willing to learn some coding and have started beginners courses in python and javascript but I have absolutely no idea how to actually implement this thing!

I'm not sure exactly what question to ask here, but could someone advise on what I need to learn and also what the 'mechanics' of this will be? Is it simply a case of doing it all in javascript in the actual web page? Apparently I might need XSLT to convert the XML, but where do I actually put it? 

I've learnt some python syntax etc, but have no idea how you use python to create a webpage.

I'm not asking for anything detailed here, I just need a clue about what framework I will use to achieve this.

Sorry this is so vague, but as I say I don't really the question to ask - I just need pointing in the right direction.




My EPL football websites: Get the results but hide the score of your team at HidetheScore.net. Compare league positions with wage bills at RealPremierLeague.net.


Create new topic
Killerkiwi2005
374 posts

Ultimate Geek
+1 received by user: 85

Trusted

  #1015248 29-Mar-2014 23:42
Send private message

I will teach you rule number 1 of programming "google it"

hit number one for "jquery xml table"
http://www.daigo.org/2010/08/simple-xml-to-html-table-using-jquery/




aboylikedave

243 posts

Master Geek
+1 received by user: 4


  #1015371 30-Mar-2014 13:18
Send private message

Ha! Thanks.i had certainly got to the 'have you been trying I this for over half an hour' box!

Your answer has also helped me refine my question: when you learn how to write the code to do something, where the bloody hell does it go?!

Your javascript solution is perfect for a noob such as me.




My EPL football websites: Get the results but hide the score of your team at HidetheScore.net. Compare league positions with wage bills at RealPremierLeague.net.


itxtme
2102 posts

Uber Geek
+1 received by user: 557


  #1015382 30-Mar-2014 13:52
Send private message

when you learn how to write the code to do something, where the bloody hell does it go?!



Languages require software to view and turn the code into useful user output.  Where the code goes depends on what type of language it is.  For javascript the decompiler is in the browser, so your internet explorer or google chrome reads the code and outputs the result.

To run it locally you could save it in any folder.  You can build it inline. ie place the javascript with the html page, or you can call the javascript from its own file .js within the html page



Killerkiwi2005
374 posts

Ultimate Geek
+1 received by user: 85

Trusted

  #1015408 30-Mar-2014 14:32
Send private message

aboylikedave: Ha! Thanks.i had certainly got to the 'have you been trying I this for over half an hour' box!

Your answer has also helped me refine my question: when you learn how to write the code to do something, where the bloody hell does it go?!

Your javascript solution is perfect for a noob such as me.


For javascript just put it in an .html file and open it in a browser, use firefox or chrome the development tools are better

LennonNZ
2459 posts

Uber Geek
+1 received by user: 411

ID Verified
Trusted

  #1015417 30-Mar-2014 15:39
Send private message

Yes a XSLT Stylesheet is the easiest.

https://developer.mozilla.org/en-US/docs/XSLT_in_Gecko/Basic_Example

You put at the top of the XML file what style sheet to use and you view the XML file via a web browser. It will display the XML however you style the template.







Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.