|
-
Design Problem
Date: 08/15/05
(WebDesign) Keywords: xml, web
I am a photographer who's currently working on my portfolio website. There's a certain way that I want my website layout to look, but I can't get it to look that way because I don't know enough about Flash to save my life. I'm what you call a reverse coder. But, anyhow, I was wondering if I can get my site to look like this site.... Click on the image on the homepage... http://www.fwo3.com
I love how simple and compact it is, and it gets the point across. It has to be easy to update, meaning if I add an image to a folder that the main flash file reads, then it automatically adds a number to the side scroll where it lists the image numbers in each category. There also needs to be a way that I can put the images in a certain order because I've noticed that in image gallery flash files, it just takes the images in alphabetical order from whatever the filenames are. I've ran into problems with this. I've seen some galleries with an XML doc that the flash file reads in order to know which images load when. That might be a way around it, I don't know. Just throwing out ideas. Also, it should be easily updatable if I decide to add or delete categories on the bottom where the categories for portfolios are.
I will dedicate a seperate full page on my website with credits and links to you and your site to bring in some clients for yourself if someone can recreate this for me and send me all the files for me to upload.
THANKS IN ADVANCE.
x-posted to web_design & graphicdesign
Source: http://www.livejournal.com/community/webdesign/956500.html
-
UserControl output into an XmlNode
Date: 08/15/05
(C Sharp) Keywords: cms, html, xml
Very cheeky of me, having only just joined this community, but may I post an awkward question?
In a CMS-like environment, I have a list of items that is generated on the serverside using an XmlDocument to throw together XHTML tags (mainly because it's substantially easier than using a Repeater, but the why is a moot point as the project doesn't have the budget for me to change that).
Now I have a requirement to add a new list item at the end of each list that is an "Add new item" form. It's very easy for me to write a UserControl to handle this form action, but would be relatively difficult to write this form bit as XmlElements to add into the exsiting XmlNode tree.
Is there a way for me to get the output of the server control as an XmlNode and squish that into my XmlNode tree?
Effectively, I want to take my existing code and making it look something like this:
bool isInAuthoringMode;
XmlDocument xml;
XmlElement div;
5 // ...
if (isInAuthoringMode || (this.Assets != null &&
this.Assets.Count > 0)
{
10 XmlElement ul = xml.CreateElement("ul");
ul.Attributes.Append(xml.CreateAttribute("class"));
ul.Attributes["class"].Value = "file-list";
foreach (Asset a in this.Assets)
15 ul.AppendChild(a.ToXml(xml));
if (isInAuthoringMode)
ul.AppendChild(new EditControl().ToXml(xml));
20 div.AppendChild(ul);
}
Line 18 in this code block is what I'd really like to be able to do, but I know that would be being very optimistic.
Is there any obvious way of getting "the HTML this control would generate here" out of it, even if I have to write a new method into it somewhere?
The behavior I seek is roughly the same as if I had a Repeater like this:
But I can't use a Repeater (for reasons too tedious to detail here).
Any ideas gratefully received. Thanks!
Cross-posted to owenblacker, csharp and ms_dot_net. Sorry :o)
Source: http://www.livejournal.com/community/csharp/33259.html
-
Re: UserControl output into an XmlNode
Date: 08/16/05
(C Sharp) Keywords: html, xml
A continuation of my awkward question for any C# geeks reading.
Ok, I don'think I'm gonna find a convenient way to do it the way I'd hoped, so I've started thinking about rendering the control into a Stream and XmlDocument.Load-ing that Stream into my XmlNode hierarchy.
Except I'm not getting anything out using Control.RenderControl(HtmlTextWriter):
public XmlDocument RenderXmlDocument()
{
MemoryStream stream = new MemoryStream();
this.RenderControl(new HtmlTextWriter(new StreamWriter(stream)));
byte[] streamContents = stream.ToArray();
System.Text.StringBuilder sb = new System.Text.StringBuilder();
foreach (byte tmp in streamContents)
sb.Append(Convert.ToChar(tmp));
HttpContext.Current.Trace.Write("EditSectionOrAsset",
"Rendered control as \n\n[" + sb.ToString() + "]");
XmlDocument control = new XmlDocument();
control.Load(new XmlTextReader(new StreamReader(stream)));
return control;
}
and nothing is getting written to the Trace.
Am I gonna have to work out how to do this without using the control?
Any and all suggestions gratefully received. Cross-posted to owenblacker, csharp and ms_dot_net.
Source: http://www.livejournal.com/community/csharp/33333.html
-
RSS and XML?
Date: 08/17/05
(WebDesign) Keywords: rss, xml
So I've finally gotten the hang of working with RSS and XML. But I have a question. I have created a "what is RSS" doc to allow new users of the feature to get an understanding of how it works and to start using our feeds. But I wasn't sure what the best method of "advertising" the feeds were. I am simply providing a link to the RSS "channels" and described in my "what is RSS" doc mentioning to simply copy the link of the xml doc and paste it into your aggregator (?). Would you say this is the best method of using this feature or is there a better method? T
This method works, just wanted to see if this is the best way to go about it.
Source: http://www.livejournal.com/community/webdesign/958321.html
-
Using JavaScript to post XML to PHP
Date: 08/22/05
(PHP Community) Keywords: php, xml, java, microsoft
I've been trying to use JavaScript's XMLHttpRequest object to send XML to a PHP form. As far as sending the XML goes, I've got that worked out: try
{
var req = new XMLHttpRequest();
}
catch(e)
{
var req = new ActiveXObject("Microsoft.XMLHTTP");
}
someXML = "bar";
req.open("POST", "example.php", false);
req.setRequestHeader("Content-Type", "text/xml");
req.send(someXML);
response = req.responseXML; What I'm stuck on is how to get the PHP to receive anything in req.send(). The $_POST array only seems to store whatever I put into a query string in my URL, e.g.:req.open("POST", "example.php?foo=bar", false);
req.send(''); If I have to I guess I can just send my input that way, but I figure there must be some way PHP can recieve XML from a POST request. Any thoughts?
Source: http://www.livejournal.com/community/php/338326.html
-
iText, must-have document conversion library, Version 1.3.3 Released
Date: 08/24/05
(Java Web) Keywords: software, html, xml, java
iText is a java software library which contains API to generate documents in the Portable Document Format (PDF), XML, HTML and RTF.
It can also parse XML documents and convert them into any of these formats. Pages of existing PDF files can be imported and copied to new PDF documents.
In short if you ever thought [...]
Source: http://blog.taragana.com/index.php/archive/itext-must-have-document-conversion-library-version-133-released/
-
Files Changed from WordPress 1.5.1.3 to WordPress 1.5.2
Date: 08/24/05
(Java Web) Keywords: php, rss, xml
After briefly scanning the eleven defects fixed in 1.5.2 (an interim release before WordPress 1.6) I identified the changed files.
They are:
xmlrpc.php
comment-functions.php
wp-admin/post.php
pluggable-functions.php
registration-functions.php
wp-admin/categories.php
wp-commentsrss2.php
wp-includes/template-functions-category.php
edit-page-form.php
I am shortly planning to provide a patch update from 1.5.1.3 to 1.5.2. Hang on.
Source: http://blog.taragana.com/index.php/archive/files-changed-from-wordpress-1513-to-wordpress-152/
-
Thunderbird Goes To College
Date: 08/27/05
(Mozilla) Keywords: rss, browser, xml
A few days ago, I shared in this community, an article about the introduction of Firefox to several thousand students in France in an effort to promote open source computer applications. It was an excellent opportunity to expose Firefox to high school students and their parents. When they finally go to college, Firefox would be their most probable default browser.
Today, I ran across another interesting entry from The Hatchet, an independent student on-line newspaper from the University of Chicago. The students commented, that "while Thunderbird isn't anything new - it's been available for download in one form or another since December - it's now starting to get major attention. In April, Harvard University made a customized version available to students and faculty, and in May, New York University's Stern School of Business started using the program. This fall the University of Chicago will distribute Thunderbird to students."
Thunderbird is now being used by top notch U.S. Universities. Their students and faculty members are excited about:
* Management of multiple e-mail accounts * Customization features like themes, plug-ins and extensions * Live Bookmarks using RSS feeds
This is what they wrote about Live Bookmarks and RSS feeds: "On the left side of the screen, along with a list of your e-mail folders, you can create a list of your favorite news sources along with their headlines. Today, most blogs and online news services, including The Hatchet, offer RSS feeds that allow you to subscribe to their news and receive news on your computer as soon as it's published or posted online. The benefit of such a system is that you get all your headlines in one place as opposed to jumping all over the Internet."
"In my Thunderbird client, I have a list of my news sources - the Houston Chronicle sports section, The Washington Post Metro section, and the blog Wonkette, to name a few, above a list of my e-mail folders. Each headline appears as a new message in a folder named for the news source - click on a headline and the story is opened in the message window."
To access your favorite news sources via Thunderbird, just go to a news site, find the orange button labeled RSS or XML, right click, and select "copy link location" or "copy shortcut," and paste it into your news management section."
The student's ended their on-line newspaper with these very encouraging words; " Mozilla Thunderbird can help simplify your life - there's no reason not to download this program." I feel so proud to see that Firefox and Thunderbird are surfacing in the educational community. Thunderbird is now in college.
If you want to see a beautiful Crystal Thunderbird picture, click the link below:
Enjoy,
Omar.-
Source: http://www.livejournal.com/community/mozilla/311370.html
-
firefox doesn't like my XML
Date: 08/28/05
(Web Development) Keywords: php, xml
I'm trying to learn about XML, so i'm probably making a very basic error here....
I'm working on modding a phpBB board to display some information, optionally, as XML. Here, for example, I have a simple XSLT stylesheet associated with it and a DTD:
http://www.doorknobsoft.com/testboard/viewtopic.php?t=11&xml=true
it renders in internet explorer, and appears to be valid, but in firefox it just appears as a chunk of plain text. also, in firefox, when I had an inline DTD it shows ]> at the beginning of the page, which of course it shouldn't, leading me to wonder if it's something like the character encoding? but I don't know how to find that out or how to fix that in PHP...
Source: http://www.livejournal.com/community/webdev/239237.html
-
Stuck with XML
Date: 08/30/05
(PHP Community) Keywords: php, xml, database
I have an XML file with a format similar to what follows:
Item Title Item Description Item Size ## ## ## ## ## ## ## ## ## . .
Having never had to parse XML before, I did some searching and found very quickly and easily how to pull information out of the first node, such as a list of titles, descriptions, or sizes, but the data I want to report is:
Item1: Size, avgMonthlysales Item2: Size, avgMonthlysales etc.
preferably with each value in a separate array so they could be easily called as $item[x], $size[x]...
I'm using PHP5, so I've been working with the simplexml functions, although I have worked with the older xml functions. I haven't figured out how to get the data from the monthlysales under each corresponding item.
Any pointers as to where I can look for more information on this? Thanks.
Edit: I'm a little closer, but still need some help. I discovered all of the operators that work with xpath.
Here's my (borrowed) code:
$result = $xml->xpath('item/title | item/size | item/monthlysales/avg'); while (list( ,$node) = each($result)){ echo $node.' '; }
This gives me a very nice Item1 Size avgMonthylsales.
I'd still like to make these into separate arrays because I want to compare them individually with existing database entries, and here is where I'm not smart enough and request help.
Source: http://www.livejournal.com/community/php/340072.html
-
XML
Date: 08/30/05
(WebDesign) Keywords: html, xml
okay nevermind.. i had a question as to why i couldn't use html markup in my xml doc but i tried encoding the < and > and well it now works.. doh..
Source: http://www.livejournal.com/community/webdesign/966387.html
-
javascript
Date: 08/30/05
(Web Development) Keywords: php, html, xml, java
I shall start by saying that I really don't know much at all about javascript.
I'm trying to send my xhtml as application/xhtml+xml wherever possible, which means I need well formed xml or I get lots of lovely errors. I'm usually a validation nut, so this hasn't been a problem with most stuff. However, I have several fanlistings on my site which use a script called phpfanbase.
I've spent lots of time converting its html to xhtml, and removing lots of silly tables etc. Now the only thing stopping it from validating/being well formed is this bit of javascript:
function submitonce(theform){ //if IE 4+ or NS 6+ if (document.all||document.getElementById){ //screen thru every element in the form, and hunt down "submit" and "reset" for (i=0;ivar tempobj=theform.elements[i] if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset") //disable em tempobj.disabled=true } } }
Can anyone explain what this does? If it's nothing too important then I'm just going to delete it I think. thanks :)
Source: http://www.livejournal.com/community/webdev/240007.html
-
Fetching https with curl
Date: 08/31/05
(PHP Community) Keywords: xml, web
For the past couple of weeks I've used the following code to send post requests via https and receive an XML response:
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
ob_start();
$responseXML = curl_exec($ch);
ob_end_clean();
curl_close($ch);
This worked great as recently as this afternoon. Then, suddenly, it completely stopped working. At 4:00 it'd post to http or https, and by 5:30 I couldn't get curl to do anything for any https URL. The strangest thing is that I hadn't touched this code at all in the meantime--it'd been working so well that I hadn't needed to.
Unless my webhost did something funky this evening--and I'm still waiting to hear from them about it--I have to assume I caused this, but I have no idea what I did. What could have happened?
Source: http://www.livejournal.com/community/php/340672.html
-
Thoughts about Firefox and Aggregation
Date: 09/09/05
(Mozilla) Keywords: rss, xml, google
Talk about circular thinking...
In the ever-burgeoning world of the Internet, the word "aggregation" is of the utmost importance, as everything else basically revolves around it. The provision of the content for it, the networkings by which such is provided to the end user, the needed improvements of the aforementioned: all 3 of those everlasting issues play a key role in the continuing expansion of the Internet, especially when it comes to periodically-updated content, as in news, editorials, and so forth.
Which is why I'm eyeing the continual developments of "news feeds", particularly of the RSS, Atom, and Podcast type.
For some odd reason, it seems as if those three formats are only residing within the reserve of bloggers (mostly in the English-speaking world), a few newspapers, a few email groups (provided by Google Groups for its classic Usenet newsgroups....which begs the question: does *anybody* use Usenet or newsgroups anymore?!), and not much else.
I mean, yes, the Internet public is beginning to switch from the old newsgroups, from which some of today's best and brightest stars in the IT industry claim some of their personal roots, to the idea of viewing posts without having to fill up their own inboxes. Furthermore, the feed formats in question are beginning to expand as well: hopefully, they'll have Photo/Image and Email-List RSS feeds in the very near future, as they also have Media RSS (predominately audio, and most recently video) and so forth.
Thus, to bring it home, Mozilla Firefox (here here!), in order to keep up with the development and expansion of RSS (which has basically become a synonym for "news feeds"), has to keep on its toes in this wise. What I'm hoping this time around (with Firefox 1.5 beta) is that they (at Mozilla), or some third-party XUL aficionado, will come up with a brand new feed aggregation extension which will be both simplified (unlike WizzRSS), declutsified (unlike InfoRSS), and unlimited in both functionality and feed access (unlike Sage, which is the only one doing much of anything for me at present). Same goes (probably more) for Mozilla Thunderbird and Mozilla Sunbird/Calendar.
Furthermore, I'm hoping that newsgroups (of the classic news:// protocol) will convert to the .xml (the one responsible for RSS, OPML, Atom, and so forth) format in the future, insothat, again, people will be able to access the latest discussions and postings without filling up their inbox.
Speaking of which, I just came up with an idea within the midst of this writing:
Is there some sort of standalone RSS/newsgroup client which can handle feeds of all types?
Or, furthermore....would it make sense to relegate RSS feeds to the news:// (newsgroup) protocol, since RSS feeds are basically the same exact thing as news feeds?
Damn, I'm thinking in circles, lol.
Source: http://www.livejournal.com/community/mozilla/316970.html
-
Improved Firefox 1.0.7 and Mozilla 1.7.12 Release Candidates
Date: 09/18/05
(Mozilla) Keywords: html, xml, security, web
"The Mozilla Quality weblog has details of a new round of Mozilla Firefox 1.0.7 and Mozilla 1.7.12 release candidates. These latest test builds include a fix for bug 308484, which changes the behaviour of XMLHttpRequest to improve compatibility with extensions. The weblog post has information about the areas to test."
"Mozilla Firefox 1.0.7 and Mozilla 1.7.12 are security updates designed to fix the IDN link buffer overflow vulnerability and several other security flaws. They will also include stability improvements and some fixes for regressions introduced by previous security updates. The final 1.0.7 and 1.7.12 releases are expected in a few days."
Read more: http://www.mozillazine.org/talkback.html?article=7370
Regards,
Omar.-
Source: http://www.livejournal.com/community/mozilla/320800.html
-
Text formatting and System.Xml
Date: 09/25/05
(C Sharp) Keywords: xml
I am having a bit of a rough time with System.Xml, namely getting the XML that one of my classes generates to Load() back into an XmlDocument.
I am creating the XML with an XmlTextWriter using UTF-8 encoding. I write out the XML, obeying the spec to a fault. Everything is fine to this point.
Now, depending on how I load the XML back into a new XmlDocument, I get an error, or not. To wit:
Scenario 1: After I generate the XML, I write it straight to a text file using a StreamWriter (two lines: writer.Write(thisXML) and writer.Close()). Then, I make a new XmlDocument(), and call thisDoc.Load("myXMLFile.txt"). In this scenario, everything loads fine -- all of the document's children are available, and there are no exceptions.
The thing is, I'd like to avoid the whole writing to a text file bit, and keep it all in memory.
Scenario 2: After I generate the XML, I store it in a string. Then, I make a new XmlDocument(), and call thisDoc.LoadXml(myXMLString). In this scenario, on the line immediately following the LoadXml() method, I get a "System Error" exception from System.Xml. No other information from the exception.
I've put the contents of the XML string into a text box, and copied-pasted into several online XML schema checkers, and there are no errors. As a matter of fact, the EXACT SAME XML loads perfectly fine from a file.
I've also tried copying the string into a MemoryStream and calling thisDoc.Load(thisMemStream), figuring that maybe LoadXml() and Load() were different. Even using the memorystream, I get the same "System Error" exception.
What gives? Is it something with how UTF-8 is stored in a string vs. how it is stored in the file system? Is the file system doing something to the text representation that subsequently allows the System.Xml reader to successfully load the XML stream?
Argh. Any help appreciated.
Source: http://www.livejournal.com/community/csharp/36306.html
-
XML part deux
Date: 09/26/05
(C Sharp) Keywords: xml, web
Sorry to post another XML question so soon, but I promise this one's fundamentally different enough from the last one to merit a new post...
So I am creating an XML string in a class that gets bundled inside another XML string by another class before being sent to a WebService, where the reverse occurs (class members are populated by the XML string; a sort of deserialization, but not using the framework).
Let me first say that it works. One of the XML nodes contains an image encoded with base64, which is how I've been testing whether the XML is successfully built, parsed, transmitted, etc. I have a small client application that builds the XML and tests it by deserializing the image and displaying it; the server receives the XML, deserializes the image, and saves the image to the filesystem, where I can verify that it saves properly, displays properly, and all that jazz. So everything is working fine.
The trouble is that I've built into my WebService a functionality by which any string larger than a certain amount of bytes (currently 16k, but it can be changed) gets broken into chunks and sent one chunk at a time. The WebService reassembles the chunks, calculates the MD5 of the entire string, compares it to an MD5 of the string calculated by the client that the client sent prior to sending all these chunks, and if they match, commits the transaction into the session.
Let me also say that the above "chunking" process works on XML streams other than the one containing the image. For example, I tested it with a 1.7MB XML string that simply contained a bunch of ASCII nodes. The MD5s matched, I manually verified that the XML strings were identical on client and server, etc. So the source code is sound.
However, when I combine the above two particular processes -- the XML string containing an image in base64 and the "chunking" process -- a strange thing occurs. The MD5s no longer match after "chunking." Additionally, the lengths of the strings according to the client and the server after the string has been transmitted to the server differ by about 4k (the client says it's around 358k; the server says it's 354k). But when I ask the client and server each to write a text file of the XML, they both write out identical files that compare (using fc from the command prompt) with no differences found.
I'm officially stumped. Is it something having to do with base64? Is the base64 encoding getting conserved on the client side, but .NET's serialization is flattening it to ASCII for the server-side? Clearly such flattening doesn't matter, because the server can still put the image together without any errors. So if this is the problem, is there any way I can force this flattening to occur on the client-side prior to calculating an MD5 of the transmission?
I've tried forcing the XML through System.Text.Encoding.ASCII.GetBytes() and GetString() for kicks, but it didn't change the size nor the above problems.
If my theory is incorrect, please help me understand the problem and maybe what I could do to solve it given the above requirements.
Any help is appreciated!
Source: http://www.livejournal.com/community/csharp/36564.html
-
Problem with perl grab/dump code
Date: 10/14/05
(Web Development) Keywords: rss, xml, seo
code seems to be completing steps, but the dumpout isn't working. I'm certain I have something missing or misplaced that is causing this. Any help would be appreciated.
#!/usr/bin/perl -w # # Craigslist gearfinder # see: http://www.blablabla.com
use strict; use XML::Simple; use LWP::Simple; use Data::Dumper;
package cl-carfind; use Devel::Peek; my $readonly = "Test"; sub match { $readonly =~ /\w/g; } sub print_pos{ print "pos: ",pos($readonly),"\n";} sub dump{ my $dump_file = "/tmp/dump.$$"; print "Dumping the data into $dump_file\n"; open OLDERR, ">&STDERR"; open STDERR, ">".$dump_file or die "Can't open $dump_file: $!"; Dump($readonly); close STDERR ; open STDERR, ">&OLDERR"; } 1;
my $debug = 0;
my @feeds = ( 'http://albany.craigslist.org/ele/index.rss', 'http://allentown.craigslist.org/ele/index.rss', 'http://albuquerque.craigslist.org/ele/index.rss', 'http://anchorage.craigslist.org/ele/index.rss', 'http://annarbor.craigslist.org/ele/index.rss', 'http://asheville.craigslist.org/ele/index.rss', 'http://atlanta.craigslist.org/ele/index.rss', 'http://austin.craigslist.org/ele/index.rss', 'http://bakersfield.craigslist.org/ele/index.rss', 'http://baltimore.craigslist.org/ele/index.rss', 'http://batonrouge.craigslist.org/ele/index.rss', 'http://bham.craigslist.org/ele/index.rss', 'http://boise.craigslist.org/ele/index.rss', 'http://boston.craigslist.org/ele/index.rss', 'http://buffalo.craigslist.org/ele/index.rss', 'http://burlington.craigslist.org/ele/index.rss', 'http://chambana.craigslist.org/ele/index.rss', 'http://charleston.craigslist.org/ele/index.rss', 'http://charlotte.craigslist.org/ele/index.rss', 'http://chicago.craigslist.org/ele/index.rss', 'http://chico.craigslist.org/ele/index.rss', 'http://cincinnati.craigslist.org/ele/index.rss', 'http://cleveland.craigslist.org/ele/index.rss', 'http://columbia.craigslist.org/ele/index.rss', 'http://columbus.craigslist.org/ele/index.rss', 'http://dallas.craigslist.org/ele/index.rss', 'http://delaware.craigslist.org/ele/index.rss', 'http://dayton.craigslist.org/ele/index.rss', 'http://denver.craigslist.org/ele/index.rss', 'http://desmoines.craigslist.org/ele/index.rss', 'http://detroit.craigslist.org/ele/index.rss', 'http://elpaso.craigslist.org/ele/index.rss', 'http://eugene.craigslist.org/ele/index.rss', 'http://fortmyers.craigslist.org/ele/index.rss', 'http://fresno.craigslist.org/ele/index.rss', 'http://grandrapids.craigslist.org/ele/index.rss', 'http://greensboro.craigslist.org/ele/index.rss', 'http://harrisburg.craigslist.org/ele/index.rss', 'http://hartford.craigslist.org/ele/index.rss', 'http://houston.craigslist.org/ele/index.rss', 'http://honolulu.craigslist.org/ele/index.rss', 'http://humboldt.craigslist.org/ele/index.rss', 'http://indianapolis.craigslist.org/ele/index.rss', 'http://inlandempire.craigslist.org/ele/index.rss', 'http://ithaca.craigslist.org/ele/index.rss', 'http://jackson.craigslist.org/ele/index.rss', 'http://jacksonville.craigslist.org/ele/index.rss', 'http://kansascity.craigslist.org/ele/index.rss', 'http://knoxville.craigslist.org/ele/index.rss', 'http://littlerock.craigslist.org/ele/index.rss', 'http://lasvegas.craigslist.org/ele/index.rss', 'http://lexington.craigslist.org/ele/index.rss', 'http://losangeles.craigslist.org/ele/index.rss', 'http://louisville.craigslist.org/ele/index.rss', 'http://maine.craigslist.org/ele/index.rss', 'http://madison.craigslist.org/ele/index.rss', 'http://memphis.craigslist.org/ele/index.rss', 'http://miami.craigslist.org/ele/index.rss', 'http://milwaukee.craigslist.org/ele/index.rss', 'http://minneapolis.craigslist.org/ele/index.rss', 'http://mobile.craigslist.org/ele/index.rss', 'http://modesto.craigslist.org/ele/index.rss', 'http://montana.craigslist.org/ele/index.rss', 'http://monterey.craigslist.org/ele/index.rss', 'http://montgomery.craigslist.org/ele/index.rss', 'http://nashville.craigslist.org/ele/index.rss', 'http://nh.craigslist.org/ele/index.rss', 'http://newhaven.craigslist.org/ele/index.rss', 'http://newjersey.craigslist.org/ele/index.rss', 'http://newyork.craigslist.org/ele/index.rss', 'http://neworleans.craigslist.org/ele/index.rss', 'http://norfolk.craigslist.org/ele/index.rss', 'http://nd.craigslist.org/ele/index.rss', 'http://oklahomacity.craigslist.org/ele/index.rss', 'http://omaha.craigslist.org/ele/index.rss', 'http://orangecounty.craigslist.org/ele/index.rss', 'http://orlando.craigslist.org/ele/index.rss', 'http://pensacola.craigslist.org/ele/index.rss', 'http://philadelphia.craigslist.org/ele/index.rss', 'http://phoenix.craigslist.org/ele/index.rss', 'http://pittsburgh.craigslist.org/ele/index.rss', 'http://portland.craigslist.org/ele/index.rss', 'http://puertorico.craigslist.org/ele/index.rss', 'http://providence.craigslist.org/ele/index.rss', 'http://raleigh.craigslist.org/ele/index.rss', 'http://redding.craigslist.org/ele/index.rss', 'http://reno.craigslist.org/ele/index.rss', 'http://richmond.craigslist.org/ele/index.rss', 'http://rochester.craigslist.org/ele/index.rss', 'http://sacramento.craigslist.org/ele/index.rss', 'http://saltlakecity.craigslist.org/ele/index.rss', 'http://sanantonio.craigslist.org/ele/index.rss', 'http://sandiego.craigslist.org/ele/index.rss', 'http://www.craigslist.org/ele/index.rss', 'http://slo.craigslist.org/ele/index.rss', 'http://santabarbara.craigslist.org/ele/index.rss', 'http://savannah.craigslist.org/ele/index.rss', 'http://seattle.craigslist.org/ele/index.rss', 'http://shreveport.craigslist.org/ele/index.rss', 'http://sd.craigslist.org/ele/index.rss', 'http://spokane.craigslist.org/ele/index.rss', 'http://stlouis.craigslist.org/ele/index.rss', 'http://stockton.craigslist.org/ele/index.rss', 'http://syracuse.craigslist.org/ele/index.rss', 'http://tallahassee.craigslist.org/ele/index.rss', 'http://tampa.craigslist.org/ele/index.rss', 'http://toledo.craigslist.org/ele/index.rss', 'http://tucson.craigslist.org/ele/index.rss', 'http://tulsa.craigslist.org/ele/index.rss', 'http://washingtonDC.craigslist.org/ele/index.rss', 'http://westernmass.craigslist.org/ele/index.rss', 'http://westpalmbeach.craigslist.org/ele/index.rss', 'http://wv.craigslist.org/ele/index.rss', 'http://wichita.craigslist.org/ele/index.rss', 'http://wyoming.craigslist.org/ele/index.rss', 'http://calgary.craigslist.org/ele/index.rss', 'http://edmonton.craigslist.org/ele/index.rss', 'http://halifax.craigslist.org/ele/index.rss', 'http://montreal.craigslist.org/ele/index.rss', 'http://ottawa.craigslist.org/ele/index.rss', 'http://quebec.craigslist.org/ele/index.rss', 'http://saskatoon.craigslist.org/ele/index.rss', 'http://toronto.craigslist.org/ele/index.rss', 'http://vancouver.craigslist.org/ele/index.rss', 'http://victoria.craigslist.org/ele/index.rss', 'http://winnipeg.craigslist.org/ele/index.rss', 'http://buenosaires.craigslist.org/ele/index.rss', 'http://caracas.craigslist.org/ele/index.rss', 'http://costarica.craigslist.org/ele/index.rss', 'http://lima.craigslist.org/ele/index.rss', 'http://mexicocity.craigslist.org/ele/index.rss', 'http://rio.craigslist.org/ele/index.rss', 'http://santiago.craigslist.org/ele/index.rss', 'http://saopaulo.craigslist.org/ele/index.rss', 'http://tijuana.craigslist.org/ele/index.rss', 'http://amsterdam.craigslist.org/ele/index.rss', 'http://athens.craigslist.org/ele/index.rss', 'http://barcelona.craigslist.org/ele/index.rss', 'http://berlin.craigslist.org/ele/index.rss', 'http://brussels.craigslist.org/ele/index.rss', 'http://budapest.craigslist.org/ele/index.rss', 'http://copenhagen.craigslist.org/ele/index.rss', 'http://florence.craigslist.org/ele/index.rss', 'http://frankfurt.craigslist.org/ele/index.rss', 'http://geneva.craigslist.org/ele/index.rss', 'http://hamburg.craigslist.org/ele/index.rss', 'http://helsinki.craigslist.org/ele/index.rss', 'http://istanbul.craigslist.org/ele/index.rss', 'http://lyon.craigslist.org/ele/index.rss', 'http://madrid.craigslist.org/ele/index.rss', 'http://marseilles.craigslist.org/ele/index.rss', 'http://milan.craigslist.org/ele/index.rss', 'http://moscow.craigslist.org/ele/index.rss', 'http://munich.craigslist.org/ele/index.rss', 'http://naples.craigslist.org/ele/index.rss', 'http://oslo.craigslist.org/ele/index.rss', 'http://paris.craigslist.org/ele/index.rss', 'http://prague.craigslist.org/ele/index.rss', 'http://rome.craigslist.org/ele/index.rss', 'http://stpetersburg.craigslist.org/ele/index.rss', 'http://stockholm.craigslist.org/ele/index.rss', 'http://vienna.craigslist.org/ele/index.rss', 'http://warsaw.craigslist.org/ele/index.rss', 'http://zurich.craigslist.org/ele/index.rss', 'http://bangalore.craigslist.org/ele/index.rss', 'http://bangkok.craigslist.org/ele/index.rss', 'http://beijing.craigslist.org/ele/index.rss', 'http://chennai.craigslist.org/ele/index.rss', 'http://delhi.craigslist.org/ele/index.rss', 'http://hongkong.craigslist.org/ele/index.rss', 'http://hyderabad.craigslist.org/ele/index.rss', 'http://istanbul.craigslist.org/ele/index.rss', 'http://jakarta.craigslist.org/ele/index.rss', 'http://jerusalem.craigslist.org/ele/index.rss', 'http://kolkata.craigslist.org/ele/index.rss', 'http://manila.craigslist.org/ele/index.rss', 'http://mumbai.craigslist.org/ele/index.rss', 'http://osaka.craigslist.org/ele/index.rss', 'http://seoul.craigslist.org/ele/index.rss', 'http://shanghai.craigslist.org/ele/index.rss', 'http://singapore.craigslist.org/ele/index.rss', 'http://tokyo.craigslist.org/ele/index.rss', 'http://taipei.craigslist.org/ele/index.rss', 'http://telaviv.craigslist.org/ele/index.rss', 'http://cairo.craigslist.org/ele/index.rss', 'http://capetown.craigslist.org/ele/index.rss', 'http://johannesburg.craigslist.org/ele/index.rss', 'http://belfast.craigslist.org/ele/index.rss', 'http://birmingham.craigslist.org/ele/index.rss', 'http://bristol.craigslist.org/ele/index.rss', 'http://cardiff.craigslist.org/ele/index.rss', 'http://dublin.craigslist.org/ele/index.rss', 'http://edinburgh.craigslist.org/ele/index.rss', 'http://glasgow.craigslist.org/ele/index.rss', 'http://leeds.craigslist.org/ele/index.rss', 'http://liverpool.craigslist.org/ele/index.rss', 'http://london.craigslist.org/ele/index.rss', 'http://manchester.craigslist.org/ele/index.rss', 'http://newcastle.craigslist.org/ele/index.rss', 'http://adelaide.craigslist.org/ele/index.rss', 'http://auckland.craigslist.org/ele/index.rss', 'http://brisbane.craigslist.org/ele/index.rss', 'http://melbourne.craigslist.org/ele/index.rss', 'http://perth.craigslist.org/ele/index.rss', 'http://sydney.craigslist.org/ele/index.rss', );
for my $feed (@feeds) { my $xml = get($feed); my $ref = XMLin($xml); my $items = $ref->{item};
if ($debug) { print "$xml"; print Data::Dumper->Dump([$items]); print "Content-type: text/plain\r\n\r\n"; print "PID: $$\n";
exit; }
for my $item (@$items) { my $title = $item->{title}; my $url = $item->{link};
# regex match goes here if ($title =~ /runner/i) { print "$title\n $url\n\n"; } } # don't suck too much bandwidth sleep 2; }
exit;
__END__
Source: http://www.livejournal.com/community/webdev/256422.html
-
Problem with fopen() and a URL
Date: 10/20/05
(PHP Community) Keywords: xml, google
Hi I'm attempting to retrieve Geopoints from Geocoder.us for use with a google maps app. The first point I'm trying to map is 58 West First Street Addieville, IL. The following link retrieves the desired XML results:
http://rpc.geocoder.us/service/rest?address=58 West First Street, Addieville, IL
However, when I plug that URL into the following statement
$gp = fopen ("http://rpc.geocoder.us/service/rest?address=58 West First Street, Addieville, IL", "r"),
Geocoder sends back couldn't find this address! sorry. If the address is maligned any way into a bad address, this is the result it sends. Is there something wrong with this URL that gets lost or changed when fopen tries to open it? Thanks for any help you can offer.
Source: http://www.livejournal.com/community/php/356732.html
-
XML/XSLT issue
Date: 10/21/05
(Asp Dot Net) Keywords: xml, asp
I'm not sure about the XML expertise around here but I don't wanna go around to multiple groups posting this question. I'm trying to take output from a dataset that is outputted to an XML file and associate it with an XSLT to basically make a reverse table, so instead of,
Column1 | Column2 | Column3 |
Value1 | Value2 | Value3 |
I want it to display as
Column1 | Value1 |
Column2 | Value2 |
Column3 | Value3 |
Putting the whole table displaying aspect aside, right now my question is how do I get the XSLT to display the actual ELEMENT NAME as opposed to just the element values? So for (id)101(/id) I want it to come out as
The XML structure is:
NewDataSet Table Element Table NewDataSet
Obviously there are multiple elements. The thing about this (and why I'm even EXPLORING this) is that the XML files have dynamic tags.
If anyone has any information as to how I would get to display this information would be greatly appreciated. Thank you.
Source: http://www.livejournal.com/community/aspdotnet/44993.html
|