search for: raw_xml

Displaying 2 results from an estimated 2 matches for "raw_xml".

2006 Jun 24
1
Parsing XML with REXML problem
...'' include REXML # classes to represent the objects and relationships in the xml file class Article attr_accessor :id, :post, :archive, :ntype, :head, :blurb, :body, :fblurb, :fimage, :att, :source, :copy, :brand end # the base parser class BaseXMLParser def initialize(filename) @raw_xml = File.open(filename).read @newsfeed = [] end end # DOM-based 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[&...
2006 Jun 26
0
DBI question. How do I load a database with data parsed from REXML?
...de REXML # classes to represent the objects and relationships in the xml file class Article attr_accessor :id, :post, :archive, :ntype, :head, :blurb, :body, :fblurb, :fimage, :att, :source, :copy, :brand end # the base parser class BaseXMLParser def initialize(filename) @raw_xml = File.open(filename).read @newsfeed = [] end end # DOM-based parsing class FeedXMLParser < BaseXMLParser def get_newsfeed doc = Document.new(@raw_xml) XPath.each(doc, ''NEWSFEED/ARTICLE'') do |article| p = Article.new p.id = artic...