xml-namespaces

Is it legal to have different SOAP namespaces/versions between the request and response?

两盒软妹~` 提交于 2019-12-06 14:26:14
问题 THIRD EDIT: I now believe that this problem is due to a SOAP version mismatch (1.1 request, 1.2 response) masquerading as a namespace problem. Is it illegal to mix versions, or just bad style? Am I completely out of luck if I can't change my SOAP version or the service's? SECOND EDIT: Clarified error message, and tried to reduce "tl;dr"-ness. EDIT: [Link deleted, not related] Using soapUI, I'm sending a request that starts with: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap

Processing RSS Feeds with Namespaces in Android

此生再无相见时 提交于 2019-12-06 14:14:57
I'm trying to write an XML parser that takes an RSS feed & fetches the image urls shown in the url attribute of the <media:thumbnail> tag. This is all being done via android.Util.Xml , & is an adaptation of the code shown here . An example RSS feed that I'm trying to use is the BBC News RSS feed . However, media is an additional namespace & (probably) as a result my parser isn't working as it should. A version of my parse method is below. Is there any (no doubt simple) way to get my list of image URLs working? public List<string> parse() { URL feedUrl = new URL("http://newsrss.bbc.co.uk/rss

Extract value from xml file with namespaces by using xmllint in bash

不问归期 提交于 2019-12-06 11:57:01
I need to extract the name value (Product Finder) from this xml: File: config.xml <?xml version="1.0" encoding="utf-8"?> <widget id="com.abc.app" version="1.3.1" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0" ios-CFBundleVersion="1.3.1.5" android-versionCode="5"> <name>Product Finder</name> <description> Description </description> </widget> I've tried: mles$ xmllint --xpath "/widget/name/text()" config.xml XPath set is empty Which is probably because my config.xml file has other namespaces. According

Parse and query SOAP in C#

冷暖自知 提交于 2019-12-06 10:37:04
问题 I am trying to parse a heavily namespaced SOAP message (source can be found also here): <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <ns1:TransactionID soapenv:mustUnderstand="1" xsi:type="xsd:string" xmlns:ns1="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2"

Create xmlns attribute in the XML using XSLT Transformation

北战南征 提交于 2019-12-06 08:32:56
问题 I am trying to add the xmlns attribute to the resulting XML with a value passed by parameter during XSLT transformation using JDK Transformer (Oracle XML v2 Parser or JAXP) but it always defaults to http://www.w3.org/2000/xmlns/ My source XML <test/> My XSLT <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://example.com"> <xsl:param name="myNameSpace" select="'http://neilghosh.com'"/> <xsl:template match="/">

Linq-to-XML with XDocument namespace issue

[亡魂溺海] 提交于 2019-12-06 07:19:46
I have this XML document: <?xml version="1.0" encoding="utf-8"?> <directoryresponse xmlns="https://www.sisow.nl/Sisow/REST" version="1.0.0"> <directory> <issuer> <issuerid>01</issuerid> <issuername>ABN Amro Bank</issuername> </issuer> <issuer> <issuerid>02</issuerid> <issuername>ASN Bank</issuername> </issuer> </directory> </directoryresponse> And this does not work: var banks = doc.Descendants("issuer").Select(x => new Bank(Convert.ToInt32(x.Element("issuerid").Value), x.Element("issuername").Value)).ToList(); But when I manual remove the directoryresponse xml namespace xmlns="https://www

XSL output XML with no prefix without using the default namespace?

白昼怎懂夜的黑 提交于 2019-12-06 07:10:18
问题 I have an XSL where I need to generate output along the lines of this: <moo xmlns="http://api.example.com"> <foo>1358944586848</foo> <bar> <a>1</a> <b>2</b> <c>3</c> </bar> </moo> I could do it like this: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://api.example.com"> <xsl:template match="/"> <xsl:element name="moo"> <!-- and so on --> However, I kind of hate using the xsl prefix in my xsl files cause I feel it clutters it up a lot. Selecting

How to read an XML file with an undefined namespace with XMLReader?

自古美人都是妖i 提交于 2019-12-06 06:58:33
I'm relatively new to parsing XML files and am attempting to read a large XML file with XMLReader. <?xml version="1.0" encoding="UTF-8"?> <ShowVehicleRemarketing environment="Production" lang="en-CA" release="8.1-Lite" xsi:schemaLocation="http://www.starstandards.org/STAR /STAR/Rev4.2.4/BODs/Standalone/ShowVehicleRemarketing.xsd"> <ApplicationArea> <Sender> <Component>Component</Component> <Task>Task</Task> <ReferenceId>w5/cron</ReferenceId> <CreatorNameCode>CreatorNameCode</CreatorNameCode> <SenderNameCode>SenderNameCode</SenderNameCode> <SenderURI>http://www.example.com</SenderURI> <Language

Difference between using an XML namespace prefix and specifying an xmlns=“blah” as an attribute

纵饮孤独 提交于 2019-12-06 06:37:56
What (if any) is the difference between the below xml snippets, with regards to namespace? Form1 <prf:XmlElement1 xmlns:prf="namespacename"> ...snip... </prf:XmlElement1> Form2 <XmlElement1 xmlns="namespacename"> ...snip... </XmlElement1> I'm interacting with a web service that chokes on an element when its namespace is described as in Form2, but works fine if the namespace is described as in Form1. Unfortunately, I haven't been able to convince my web service framework to emit the element like Form1; the best I can get so far is Form2. It seems to me that both forms are correctly specifying

XSD Import NameSpaces

馋奶兔 提交于 2019-12-06 06:35:13
I have a two xsd files "first.xsd" and "second.xsd". Inside second.xsd, I want to refer to an element defined in first.xsd (with different namespace). My second.xsd looks like: <xs:schema ... xmlns:schema1="http://www.schema.org/schema1" targetNamespace "http://www.schema.org/schema2 ... > <xs:import namespace = "http://www.schema.org/schema1" schemaLocation = "first.xsd" /> <xs:element name = "complex1"> <xs:complexType> ......... <xs:element ref="schema1:name2"/> ......... </xs:complexType> </xs:element> Now I want to include and import second.xsd inside first.xsd So I do the following in