I am trying to create this sample in a Ruby on Rails application with a gem builder :
<?xml version="1.0" encoding="utf-8"?> <ngp:contactGet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ngp="http://www.ngpsoftware.com/ngpapi"> <campaignID>1033</campaignID> <contactID>199434</contactID> </ngp:contactGet>
I can generate a tag with a namespace as follows:
xml = Builder::XmlMarkup.new xml.ngp :contactGet
... but I cannot get the attribute inside this tag.
I would have thought that
xml.ngp :contactGet("xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance" "xmlns:ngp" =>"http://www.ngpsoftware.com/ngpapi"
will work, but it is not.
Please, help!
source share