twitter

Recent Comments

David Boyer
David Boyer January 13, 2012 at 10:05AM
Is Your CFLOOP Hogging Memory or Causing OutOfMemory Errors?

Interesting to find that out, wouldn't have expected it to be a problem. I've had similar...

baljit dhanoa
baljit dhanoa January 12, 2012 at 9:08AM
Creating A Recent Comments Widget With Disqus's API and PHP

Creating A Recent Comments Widget With Disqus's API and PHP good code pls try

Web Hosting Provider
Web Hosting Provider January 10, 2012 at 5:23PM
Creating A Recent Comments Widget With Disqus's API and PHP

Superb and very informative for me,,,

web hosting
web hosting December 2, 2011 at 7:28AM
If PHP's file_get_contents Function is Failing With IIS 7

I am new guy for this PHP. i get it clear idea about your topic.All the points are explained...

Aaron J. White
Aaron J. White November 14, 2011 at 11:54PM
Creating A Recent Comments Widget With Disqus's API and PHP

If you want to put the number of posts in a different area than the recent comments section...

Aaron J. White
Aaron J. White November 14, 2011 at 10:10PM
Creating A Recent Comments Widget With Disqus's API and PHP

It depends, are you using wordpress or joomla? I have a different plugin that checks disqus for...

Yulia Novozhilova
Yulia Novozhilova November 14, 2011 at 4:22PM
Creating A Recent Comments Widget With Disqus's API and PHP

very cool... it works! Do you know if it is possible to include number of total post likes on...

Aaron J. White
Aaron J. White October 30, 2011 at 10:40AM
Creating A Recent Comments Widget With Disqus's API and PHP

Hmm...It would probably help if I post a comment on my site so people can actually see my...

Coldfusion XmlSearch and EPUB Open Container Format

Posted: October 11th, 2011 - So I nearly pulled out all my hair last night as I spent way to long trying to figure out why my simple xpath query was not working on an EPUB container xml file. No matter what I did my Coldfusion xmlsearch function kept returning an empty array. Turns out the issue was because the EPUB OCF specification uses a default namespace in its root element.

Of course, with it being my first time using the Coldfusion XmlSearch function and xpath none of the examples I looked at online, such as here had namespaces in them. Thus, I was unaware that an xpath string like "/container/rootfiles/rootfile" would not work on xml defined like the below:

<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0">
   <rootfiles>
      <rootfile full-path="OPS/content.opf" media-type="application/oebps-package+xml"/>
   </rootfiles>
</container>

Notice the xmlns attribute in the container tag. That tells the xml document that a namespace has been defined. According to my light reading namespaces in xml are often given a prefix. However, the OCF specification uses a default namespace so a prefix is not used. That means you just use a colon(:) like so "/:container/:rootfiles/:rootfile".

Quick thanks to the site below which lead my to solve and understand my issue:

http://www.talkingtree.com/blog/index.cfm/2005/11/18/XmlSearchNoNameNamespace


blog comments powered by Disqus