xml version unwanted

7 views
Skip to first unread message

rayb...@gmail.com

unread,
Nov 14, 2015, 3:11:38 PM11/14/15
to nokogiri-talk
I'm trying to pretty print a soap body for debugging purposes, and I noticed that nokogiri is automatically inserting:
<?xml version="1.0"?>

into the start of the soap body. 

My code:
require 'ap' #sudo gem install awesome_print
require 'nokogiri'

mySoap = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:setupService.webservices"><soapenv:Body><urn:setup><setupActionInput><urn:var1>?</urn:var1><urn:var2>?</urn:var2><urn:var3>?</urn:var3></setupActionInput></urn:setup></soapenv:Body></soapenv:Envelope>'

ap Nokogiri::XML( mySoap )


How do I prevent that from getting in there?

Lars Kanis

unread,
Nov 15, 2015, 2:45:59 AM11/15/15
to nokogi...@googlegroups.com
Am 13.11.2015 um 19:56 schrieb rayb...@gmail.com:
I'm trying to pretty print a soap body for debugging purposes, and I noticed that nokogiri is automatically inserting:
<?xml version="1.0"?>

Use Nokogiri::XML.fragment( mySoap ) in this case.

--
Regards,
Lars

Reply all
Reply to author
Forward
0 new messages