Displaying 3 results from an estimated 3 matches for "posting_d".
Did you mean:
posting_id
2006 Jun 24
1
Parsing XML with REXML problem
...parsing
class FeedXMLParser < BaseXMLParser
def get_newsfeed
doc = Document.new(@raw_xml)
XPath.each(doc, ''newsfeed/article'') do |article|
art = Article.new
art.id = article.attributes[''id'']
art.post = article.attributes[''posting_date'']
art.archive = article.attributes[''archive_date'']
art.ntype = article.elements[''news_type'']
art.head = article.elements[''headline''].text
art.blurb = article.elements[''blurb''].text
art....
2007 Oct 15
6
SQL injection with :order, :limit, :group
I know how to avoid SQL injection attacks when you use :conditions
User.find :first, :conditions => ["login=?", params[:username]]
but how about with :order, :limit or :group?
# uh-oh...spaghetti-oh
User.find :first, :order => "login; delete from users; select * from users"
Pat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you
2006 Jun 26
0
DBI question. How do I load a database with data parsed from REXML?
...g
class FeedXMLParser < BaseXMLParser
def get_newsfeed
doc = Document.new(@raw_xml)
XPath.each(doc, ''NEWSFEED/ARTICLE'') do |article|
p = Article.new
p.id = article.attributes[''ID'']
p.post = article.attributes[''POSTING_DATE'']
p.archive = article.attributes[''ARCHIVE_DATE'']
p.ntype = article.elements[''NEWS_TYPE'']
p.head = article.elements[''HEADLINE''].text
p.blurb = article.elements[''BLURB''].text
p....