xml-namespaces

Use Linq to Xml with Xml namespaces

Hi all, I have this code : /*string theXml = @"<Response xmlns=""http://myvalue.com""&gt;&lt;Result xmlns:a=""http://schemas.datacontract.org/2004/07/My.Namespace"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""&gt;&lt;a:TheBool&gt;true&lt;/a:TheBool&gt;&lt;a:TheId&gt;1&lt;/a:TheId&gt;&lt;/Result&gt;&lt;/Response&gt;";*/ string...

Using XML::LibXML: How do I create namespaces and child elements and make them work together?

I'm trying to do some stuff with FOAF and Perl. I'm unhappy with the current solutions and I want to roll my own. Please do not reference any module other than XML::LibXML. For reference here is a snippet from a FOAF file <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/...

Using perl's XML::LibXML how do you use XML Prefixes and not xmlns attributes?

I believe this question might have been previously attempted in 2006 on a different site. But, my current XML/RDF writer (XML::LibXML 1.70) outputs element namespaces in the form of xmlns attributes. This will exclude people using non-namespace aware parsers who just do a look_down for foaf:Person. I'm wondering if anyone knows of an eas...

XSLT transformation to produce valid XHTML: a namespace issue

I have seen this resource link text but I still have troubles generating a valid XHTML document using MSXML parser. I have in input the following document: <?xml version="1.0" encoding="UTF-8" ?> - <html xml:lang="it" xmlns="http://www.w3.org/1999/xhtml"&gt; - <head xmlns=""> <meta http-equiv="Content-Type" content="text/html; c...

WCF contracts - namespaces and SerializationExceptions

I am using a third party web service that offers the following calls and responses http://api.athirdparty.com/rest/foo?apikey=1234 <response> <foo>this is a foo</foo> </response> and http://api.athirdparty.com/rest/bar?apikey=1234 <response> <bar>this is a bar</bar> </response> This is the contract and supporting types I wrot...

Client no longer getting data from Web Service after introducing targetNamespace in XSD

Sorry if there is way too much info in this post – there’s a load of story before I get to the actual problem. I thought I‘d include everything that might be relevant as I don’t have much clue what is wrong. I had a working web service and client (both written with VS 2008 in C#) for passing product data to an e-commerce site. The XSD s...

PHP: retrieve all declared namespaces of a DOMElement

I am using the DOM extension to parse an xml file containing xml namespaces. I would have thought that namespace declarations are treated just like any other attribute, but my tests seem to disagree. I have a document that starts like this: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/r...

PHP Zend XML-RPC client - "Unknown type: i8" when making a request with Zend_Crypt_Math_BigInteger?

I am using Zend 1.10's XML-RPC client library to make XML-RPC requests to another server. One of the methods I have to call uses a i8 (a.k.a. ex:i8) type, i.e. extended big integer. This is supported in Zend (cf. http://framework.zend.com/apidoc/1.10/Zend_XmlRpc/Value/Zend_XmlRpc_Value_BigInteger.html). However whenever I try to make a f...

WPF XAML Namespace import

I've found that in order to use PRISM's classes in XAML you need to import namespace in that way: xmlns:cal="http://www.codeplex.com/CompositeWPF" this way is new to me, so I wanted to know, how hyperlink could be alias of usual notation of namespace import? so the intellisence knows in which assembly it should search this component? Th...

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

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 reduc...

How do I use XPath with a default namespace with no prefix?

What is the XPath (in C# API to XDocument.XPathSelectElements(xpath, nsman) if it matters) to query all MyNodes from this document? <?xml version="1.0" encoding="utf-8"?> <configuration> <MyNode xmlns="lcmp" attr="true"> <subnode /> </MyNode> </configuration> I tried /configuration/MyNode which is wrong because it ignores the...

XSL transformation of SVG adds namespace attribute to new tag

I have a SVG file that I want to extend by adding onclick handlers to edges and nodes. I also want to add a script tag referring to a JavaScript. The problem is that the script tag gets an empty namespace attribute added to it. I haven't found any information regarding this that I understand. Why does XSLT add an empty namespace? XSL f...

What is jQuery for Document.createElementNS()?

What is jQuery for Document.createElementNS()? function emleGraphicToSvg(aGraphicNode) { var lu = function luf(aPrefix){ switch (aPrefix){ case 'xhtml': return 'http://www.w3.org/1999/xhtml'; case 'math': return 'http://www.w3.org/1998/Math/MathML'; case 'svg': return 'http://www.w3.org/2000/svg'; } ...

xforms "instance namespace" issue

I am creating an Xform that reads an XML document and creates an input form for updating the document. However, apparently due to a namespace issue none of my Xpath expressions resolve.My form works fine on a simple instance when the instance file has no namespace. However, I need the namespace support. My instance file has a namespace ...

What's a good xmlns alias for the WpfApplication1.Properties namespace?

I know I can call it whatever, but just like there is a convention for project's namespace (xmlns:local), is there a good name I could call the Properties namespace so that any coder could walk up to my code and instantly recognize it? Currently, I use xmlns:Properties, but that's too long in my opinion. ...

Is xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" a special case in XML?

When we use a namespace, we should also indicate where its associated XSD is located at, as can be seen in the following example: <?xml version="1.0"?> <Artist BirthYear="1958" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.webucator.com/Artist" xsi:schemaLocation="http://www.webucator.com/Artist Artist.xsd"...

XML Schema: Namespace issues when importing shared elements

When trying to import shared definitions from a XML Schema, I can properly reference shared types, but referencing shared elements causes validation errors. This is the schema that imports the shared definitions (example.xsd): <?xml version="1.0" encoding="UTF-8"?> <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.o...

How to deal with presence or not of xml namespaces using xslt.

I have some XML/TEI documents, and i'm writing an XSLT 2.0 to extract their content. Almost all TEI documents has no namespace, but one has the default namespace (xmlns="http://www.tei-c.org/ns/1.0"). So all documents has the same aspect, with unqulified tags like <TEI> or <teiHeader>, but if I try to extract the content, all works wit...

Processing RSS Feeds with Namespaces in Android

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 namespac...

Duplicate XML namespaces in .NET generated SOAP messages

Is there a way to automatically remove duplicate XML namespaces from messages generated by the WCF? It seems half of the message consists of duplicate namespaces. Here is an example generated by WCF: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt; <s:Header /> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-...