Displaying 20 results from an estimated 5000 matches similar to: "escaping quotes for generating xml"
2006 Jan 23
3
prototype.js: enumerable mixin for hash broken
Hello everyone.
I am not sure if this is the right place to post, please redirect me
if there is a mailinglist more specifically dealing with prototype.js.
After playing around with the very inspiring prototype library I have
found a rather annoying thing, that makes the usefulness of the
Enumerable mixin for Hashes
questionable, if I am not totally wrong (again :-).
Here an example:
2006 Nov 02
2
Rescue don't work on web applications
Hi,
I''ve a Rails application who starts a Ruby script .
The script is made via Web -> database.
Than you can select a script to start via a database list.
Problem:
In case of errors , I like to start a rescue showing the users the
problems.
render(:text => "<pre>" + CGI::escapeHTML(`
begin
/home/luc/radrails/cpe/public/startq_test.rb
2006 Aug 30
1
xml - get values
Hi
I have the following xml string that I have loaded into an REXML object
as shown below.
#xml stuff for saveRoute
require ''rexml/document''
include REXML
Xml = "<test>
<name>sam</name>
<description>this is a test</description>
<description>this is a test2</description>
</test>"
XmlObject = Document.new(Xml)
2006 Feb 01
3
XML on a external website
In my rails application i want to fetch an external xml file
So my website www.test.com needs an xml file from
www.example.com/xml.asp?query=hallo. In my rails application i want to
fetch and handle this file as an xml object.
Can anyone help me?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2008 Sep 05
3
Still confused on content blocks...
I''ve read the docs. Honestly. But, I still can''t get my site working
with the latest gem. I''m confused over when and how I need to specify
content blocks, and how these relate to the stuff in config.yaml.
The specific problem is with my analytics file include, I get errors like this:
An error has occurred: Error while processing
</analytics.en.html>: Error
2006 May 30
11
Display XML file, with some formatting.
Hi.
Im quite new to this Rails thing, but it seems like a good product so
why not try it out whit a little prototype i need to build.
What i want is to load any given XML file, and display it with some
formatting.
I have some XSD shemes to validate the XML files against, but its not
vital rigth now.
But how should i approach this task?
At first it would proberly be a good idea to load the
2004 Aug 20
8
wxruby-swig: where does wxclasses-2.4.2.xml comes from?
Was trying to understand more about the internals of wxruby-swig, where
does the big chunk of XML comes from? I saw something similiar in
Python, is that massaged out of there?
The codes produced by extractxml.rb and wxclasses-2.4.2.xml is quite
different from the original header files. Just for example the WxDialog
class.
OnXXX are non-virtual in WxWidgets, but virtual in wxruby-swig
2005 Aug 22
5
XML "Un-Builder?"
I''ve been unserializing XML in PHP with the XML_Serializer class, and
I''m wondering if anyone knows of such a class for Ruby. Nothing
fancy, just perhaps a simple way of converting arbitrary XML to a
Ruby object. Maybe this has been implemented somewhere already?
Thanks,
Raymond
2007 Sep 29
2
REXML - XML query only returning one (last) result
I''m really new to Ruby on Rails, and I''m trying to read an XML file
with REXML. No matter what I try, I am only getting the last result
returned from my query. I should be getting 365 results. Here is the
code:
include REXML
require ''rexml/document''
require ''rexml/xpath''
class MakeFootprintController < ApplicationController
def index
2010 Aug 05
7
Search large XML file -- REXML slower than a slug, regex instantaneous
Got a question hopefully someone can answer -
I am working on functionality to match on certain nodes of a largish (65mb)
xml file. I implemented this with REXML and was 2 minutes and counting
before I killed the process. After this, I just opened the console and
loaded the file into a string and did a regex search for my data -- the
result was almost instantaneous.
The question is, if I can get
2006 Mar 24
4
Parsing Filemaker 6 XML into something I can use
Hi
One of our customers has a Filemaker database which needs to be
accessed for some data. Using the Web Companion, I can query the
database for an XML version of the data. I need to be able to push
this data into an array of hashes, so I can access it in a more
convenient way. Filemaker is able to provide me with 2 XML formats
(DSO-XML and FMP-XML):
***********
DSO-XML
***********
2006 Jun 24
1
Parsing XML with REXML problem
Why can it not find my object? What am i missing here? Here is my code:
require ''rexml/document''
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)
2006 Mar 21
1
Konqueror Ajax update
I had been comparing IE and Firefox Ajax performance, and since I have a
couple of Unix boxes in my workshop, I threw Konqueror into the mix, and
reported here earlier today (or yesterday) that Konqueror ( 3.4.3) could
handle Ajax perfectly, at least as far as the simplest AWDWR Ajax example
(./example/index) was concerned.
It occurred to me to do a more grueling test.
I took the
2007 Dec 23
1
Rails: possible routing discrepancy
Hey all, I''m seeing a strange behavior in my spec that I can''t
account for. I''ve got a route that looks like this:
map.writing \
''/writing'',
:controller => ''abstracts'', :action => ''index'',
:index => { :select => ''all'' }
and I have template code that looks like this:
<br
2006 Jun 29
7
Mongrel says it works, but it doesn''t
Hello, I came to know of mongrel by pure chance, it interrested me cause
webrick never worked and instantrails for rails was very slow. the problem
with webrick is/was is that it says just this:
>ruby script/server
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class
has `-'' without escape
c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character
2006 Apr 17
5
XML-RPC Webservice API
Hi,
After following the excellent tutorials in the Agile Web Development
with Rails book, I was able to get my webservice working pretty much
perfectly :)
I can access it via SOAP and XML-RPC and look at service.wsdl to find
the API. What I can''t do however is get the API for the XML-RPC call. It
fails with :
Internal protocol error: NilClass is not a valid input stream. It must
2006 Mar 10
2
Generating RSS 1.0
Hi All,
I bought the ''beta book'' of Rails Recipes from pragprog and there''s a
tutorial in there for producing RSS 2.0, i''d like to generate RSS (RDF)
1.0 though. Can anyone point in the right direction. I''ve had little
luck finding detailed information on the ruby XML class.
Thanks
--
Posted via http://www.ruby-forum.com/.
2008 May 05
7
extract and assign xml values to variable
hi,
how can we assign an xml element value to some variable in
controller? e.g. if we have
<order>
<id>1</id>
<name>abc</name>
<location>xyz</location>
</order>
and if we want value of name i.e. ''abc'' to be assigned in a variable
declared in a controller, say order_controller, like this- temp = "value
of xml element
2006 Aug 15
5
XML question
Is there a way you can use RoR to create an .xml file?
Say I had a DB full of info that I wanted to format and have export as
"lorem.xml" inside of a specific directory in my web server?
Then, each time I updated the DB it would re-export the file (delete the
old, save the new?)
--
Posted via http://www.ruby-forum.com/.
2006 Aug 05
1
XML from Builder without the to_s element
Hi All,
I''m trying to return XML from a Rails view of an object I built up
using Builder::XmlMarkup and I find an annoying side effect is that I
get an extra <to_xml/> or <to_s/> element back which makes REXML
hiccup thinking I''m adding a recond root element when I try to parse
the return.
How can I return the XML without this last element?
Thanks,
Vince