![]() |
|
|||||||
| Notices |
| Programming Forum Web and Software Programming Forum - Java, PHP, SQL etc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Wrap the code in PHP tags to make it visible (see above)
|
|
|||
|
You're not going to be able to do anything with that as it is not valid XML.
For example at line 30 you have a < /rental> tag but there was no < rental> Have you edited the output in any way? If you haven't then ask for your money back as it isn't doing what it should be. How much has your friend paid for this software? Regards Carl Last edited by Scriptage; 14-05-2008 at 02:32 PM. |
|
||||
|
Carl,
you are correct - I have edited the code. I have uploaded the incorrect file by mistake. I have edited my first post to include the correct code. I had edited a couple of the field names to see if that would make any difference, but it didn't. The DTD that it is formatted against is avaiable at http://reaxml.realestate.com.au/propertyList.dtd Thank you for your help Ben |
|
||||
|
Hello Everyone,
I have tinkered around with it all and have managed to produce a table output Address, rent and bedrooms for rentals and Address and town for sales. My question now is that I do not wish for this information to be displayed in this way. I want it to be displayed in a table but accross multiple lines. I have done up a rough drawing and attached it along with my code your help is appreciated Cheers Ben This is my html code for reading the xml file: PHP Code:
PHP Code:
![]() |
|
|||
|
For the love of God don't use Javascript to transform XML. You need to be using XSLT:
real.xls: PHP Code:
PHP Code:
PHP Code:
Note the reference to the stylesheet at the top of the xml document. I've left the css pretty simple just so you get the general idea of what to do and so that you can style it to your requirements. If you have any questions let me know ;) Regards Carl Last edited by Scriptage; 16-05-2008 at 04:09 PM. |
|
||||
|
Quote:
A friend that also runs a hosting business told me the same thing. Unfortuently neither of us have had a lot to do with xml though. Is there another way, rather than using a style sheet. There are two reasons that I ask this: 1. I will have to manually add the link to the xsl file each time it is uploaded, and 2. I want to be able to have some sort of way of only displaying a certain category, eg. just rentals or just residential sales. Also is there a way to add search functionality, such as by price range (either selling price or rent per week depending on type selected) and also on other attributes such as bedrooms and bathrooms and if it has a pool or not Thank you so much, I will be trying google but I am about to leave Cheers, Ben |
|
|||
|
Hi Ben, The stylesheet in the above post filters by rental (I assumed this is what you wanted to do from looking at your sketch). The only way to do what you require is to use a server side programming language; it would be easy to do using .NET and possible with PERL, it all depends on what your server can handle, i.e., if you are hosted o |