Off the top of my head, Firefox exports bookmarks as a JSON array, thus you could mess around with that if you only wanted a certain folder.
UPDATE: Quick example, I created a folder called "Stuff" and added a Microsoft bookmark, I exported the Bookmark JSON and it was quite clear that a JSON element was created called "Stuff" and within that, a JSON array called "children" which contained my one and only bookmark in that folder :
{"id":28,"guid":"xSQQQQQQQ”,”title":"Stuff","index":3,"dateA dded":000000000,"lastModified": 000000000,"type":"text/x-moz-place-container","children":[{"id":29,"guid":"aDGGGGGGG”,”title":"Microsoft","index":0,"d ateAdded": 000000000,"lastModified": 000000000,"type":"text/x-moz-place","uri":"http://ww.microsoft.com/"}]}