ace’s blog

a place for me to record events in my life.

Browsing Posts in XML

Posted via web from acedanger’s posterous

I’ve been trying to make use of the Shared Items in Google Reader and show them on my blog. I’ve tried a couple of different RSS widgets without success, until this morning.

I found a widget that will display the feed correctly. It is called Google Reader widget and was written by James Wilson.

The problem with using the pre-installed RSS feed widget from WordPress was that the URL linked is malformed and if clicked, would take the user to a page that did not exist, resulting in an error page. For example, one of my shared items is a post that I wrote when we found out the gender of our new baby (which is a boy :D ). From the pre-installed RSS widget, the following URL is linked: “http://feeds.feedburner.com/~r/acedanger/~3/173558267/http://www.acedanger.com”; from  the new widget, the URL linked is “http://feeds.feedburner.com/~r/acedanger/~3/173558267/”.

The reason for the malformed URL is because of the formatting of the XML produced. The pre-installed widget is expecting the XML to be formatted according to the RSS 2.0 standard but  the XML produced by the Google Reader Shared Items feed is in the Atom standard.

That’s about as technical as I get. I know there is a difference but don’t care to be bothered with the details (not right now anyway).

Tags: , ,

If you’re looking for a WordPress-Vox Crossposter, there isn’t one that I can find anyway.  I am currently working on creating one. 

There is a WordPress-LiveJournal crossposting plugin available here (plain-text view of source here).  It was written by Evan Broder.  It works great and is an awesome plugin.  I’m modelling my cross-poster after the LJ one since Vox and LJ were created by the same company, Six Apart.  My [attempt at creating a]cross-poster is on hold until Six Apart creates some sort of documentation like they have for LJ.  Right now there isn’t an API that I can see and consequently, there is not documentation. 

One thing that I found odd on the part of Six Apart was that they don’t even show Vox in their list of products

On a side note, I have two Vox invites.  If anybody is interested, email me here or post a comment.

In a previous post, I was getting a couple of odd errors in FF 1.5.0.3 but not from IE7 beta2 whenever I would click on a contact and then try to delete another contact. I solved the errors by added a separate request object for deleting a contact. So now my little contact list uses multiple request objects. I figured that out by surfing the web (read: googling) and also by reading a book called Head Rush Ajax by Brett McLaughlin. It’s a pretty good beginner AJAX book that explains a lot of the basics, including a rough overview of DOM (which I needed).

Oh yeah baby, I got my trial index page utilizing the XML being created on-the-fly from a server-side PHP script. The XML is generated whenever a user clicks on a contact in their list. In getting the XML stuff working, I somehow broke the deletion of a contact. I have been getting these errors:

Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]” nsresult: “0×80040111 (NS_ERROR_NOT_AVAILABLE)” location: “JS frame :: http://www.peoplearray.com/index2.php :: parseXML :: line 87″ data: no]
Source File: http://www.peoplearray.com/index2.php
Line: 87

and

Error: uncaught exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]” nsresult: “0xc1f30001 (NS_ERROR_NOT_INITIALIZED)” location: “JS frame :: http://www.peoplearray.com/index2.php :: deleteContact :: line 36″ data: no]

After a little searching, I found a website that goes into what this error means and a way to fix it. I haven’t implemented any fix for this yet so there is no way to delete a contact (from the trial index page anyway) once it has been added. If you want to delete a contact, go here.

In a previous post, I was having issues reading the XML file produced. I fixed that by added the following js code:

Update: The trial index page has become the contactList.php page. I added an explanation as to what the hell peoplearray.com is all about as the index page.

Update (7.10.06): This was resolved by added another request object for the second request.� See my post here.

I just tried the peoplearray.com trial index (now with more web2.0!) :) with IE7 Beta2 at home and it actually looks pretty good. The XML that is being read is different than that of FF. In FF, there are 21 child nodes in the XML, roughly half are null and all values are null but in IE7, it is reading the nodes that I would expect it to read but their values are still being read as null. I’ve got some more web surfing to do to figure that one out.

Fun with XML…

View Comments

My idea: Click on a contact in the list and the detailed information of that contact will automagically (that’s a technical term) appear on the right hand side of the screen along with an edit and a delete button.  Well I figured since I was taking the time to do this with asynchronous javascript, I would go ahead and throw in some XML so I could say “whoa dude, my site is totally rad because it uses AJAX and is part of the totally hip and cool web 2.0!  That’s why you should totally use it!”  Now enter reality:  I got my PHP script to produce the XML really easily and I started to think that maybe adding XML to this stuff would be easy.  Enter XML.  It is kicking my ass!  Why is it so difficult for me to read the XML node values?  I can traverse the XML node tree just fine:

xmlObj = xmlDoc.documentElement;
var children= xmlObj.childNodes;
var length = xmlObj.childNodes.length;
for(var i=0; i
alert(children[i].tagName+”= “+children[i].nodeValue);
}

the children[i].nodeValue is always returning null or blank when I can see that my XML file has data in it! Another odd thing is that the length (which is the number of children nodes of the XML file) is 21!  WTF?!  There is the root node and 11 children nodes.  I’m confused…and the normally helpful web (and google) is not being especially friendly today.  Damn the luck…

XML is confusing

View Comments

I’ve been working on a “prettier” version of the PeopleArray.com. Check it out. If you are using Firefox, check out the JavaScript console after you click on a contact in the list. As of 9:40PM, the XML I’m producing is “not well formed”! WTF does that mean?! This all started after I added the

header(“Content-Type: text/xml”);

to the php script that creates each XML document. I’m at a loss and tired of looking at this stuff for tonight.

In my quest for a .com domain for my online contact list, I’ve decided (read: luckily found) a .com that I like: PeopleArray.com. I will use the mypeeps.us address as my “development” site, thus replacing dev.mypeeps.us. I’ve moved the development blog to peoplearray.com/blog as well. Since I was changing domains anyway, I thought I would go ahead and rename the MySQL tables that are the backend of the site. I spent a few minutes this morning changing the code to point and reference the new database table names.

In other news, on the main page, I’ve dropped the table look in hopes of designing some CSS. The “delete contact” takes advantage of the scriptaculous javascript that I think is really cool. I’ve also found some javascript to create “pop up” windows that I want to use for creating a new contact and maybe editting an existing contact. My other idea for editting a contact is the abilitiy to do so inline.

MyPeeps.us

View Comments

MyPeeps.usPeopleArray.com, yet another web-based contact management system.

I’ve been working on an idea that I have had for a long time ago. I feel like I now have a decent contact management system, decent enough to talk about publicly and maybe get some feedback on. It isn’t very web2.0-ish…yet, but it is a decent little web application that will store contact information and send out birthday reminders. I still have a lot more development to do but I’ve worked on it enough tonight, I’m ready for bed. I’m not in college anymore, I can’t be staying up till 2am.

Powered by WordPress Web Design by SRS Solutions © 2010 ace’s blog Design by SRS Solutions