0.0
Low commit activity in last 3 years
No release in over a year
Rexleparser is an XML parser used by the Rexle gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme
README
------

Examples
--------

require 'rexleparser'

# 1) validate typical XML
urls =<<URL
<urls><summary><recordx_type>dynarex</recordx_type><format_mask>[!short_url] [!full_url]</format_mask><schema>urls/url(short_url,full_url)</schema></summary><records><url created="2010-10-11 21:11:16 +0100" id="2" last_modified="2010-10-13 15:20:58 +0100"><short_url>aa</short_url><full_url>http://www.wired.com/</full_url></url></records></urls>
URL
doc = Rexle.new(urls)

# 2) validate XML containing newline characters
require '/home/james/learning/ruby/rexle'

urls =<<URL
<urls>
  <summary><recordx_type>dynarex</recordx_type><format_mask>[!short_url] [!full_url]</format_mask>
    <schema>urls/url(short_url,full_url)</schema>
  </summary><records><url created="2010-10-11 21:11:16 +0100" id="2" last_modified="2010-10-13 15:20:58 +0100">      <short_url>aa</short_url><full_url>http://www.wired.com/</full_url></url></records></urls>
URL
doc = Rexle.new(urls)

# 3) validate XML containing a processing instruction
urls =<<URLS
<?xml version="1.0" encoding="UTF-8"?>
<urls>
  <summary>
    <recordx_type>dynarex</recordx_type>
    <format_mask>[!short_url] [!full_url]</format_mask>
    <schema>urls/url(short_url,full_url)</schema>
  </summary>
  <records>
    <url created="2010-10-11 21:11:16 +0100" id="2" last_modified="2010-10-13 15:20:58 +0100">
      <short_url>aa</short_url>
      <full_url>http://www.wired.com/</full_url>
    </url>
    <url created="2010-10-11 21:11:16 +0100" id="3" last_modified="2010-10-13 17:07:46 +0100">
      <short_url>ae</short_url>
      <full_url>http://forrst.com/posts/Introducing_the_shortn</full_url>
    </url>
  </records>
</urls>
URLS
doc = RexleParser.new(urls)