xml-namespaces

Omit unneeded namespaces from the output

大憨熊 提交于 2019-11-30 04:50:55
问题 My XSLT is outputiung some tags with xmlns:x="http://something" attribute... How to avoid this redundant attribute? The output XML never use, neither in a the x:tag , nor in an x:attribute . EXAMPLE OF XML: <root><p>Hello</p><p>world</p></root> EXAMPLE OF XSL: <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink"> <xsl:output encoding="UTF-8" method="xml" version="1.0" indent="no"/> <xsl:template match="root"><foo> <xsl:for

What is jQuery for Document.createElementNS()?

你离开我真会死。 提交于 2019-11-30 02:26:09
问题 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'; } return ''; }; var svg = document.evaluate("svg:svg", aGraphicNode, lu, XPathResult.FIRST_ORDERED_NODE_TYPE, null). singleNodeValue; $(svg).children().remove(); rect = document.createElementNS(lu(

XML Namespaces in ASP.NET Web API

南楼画角 提交于 2019-11-29 21:17:45
问题 I am currently working on a project that requires me to output XML from its endpoints along with JSON. I have the following model: [DataContract(Namespace="http://www.yale.edu/tp/cas")] [XmlType("serviceResponse")] [XmlRoot(Namespace="http://www.yale.edu/tp/cas")] public class ServiceResponse { [XmlElement("authenticationSuccess")] public AuthenticationSuccess Success { get; set; } [XmlElement("authenticationFailure")] public AuthenticationFailure Failure { get; set; } } The output is as

Why is XmlNamespaceManager necessary?

﹥>﹥吖頭↗ 提交于 2019-11-29 19:56:27
I've come up kinda dry as to why -- at least in the .Net Framework -- it is necessary to use an XmlNamespaceManager in order to handle namespaces (or the rather clunky and verbose [local-name()=... XPath predicate/function/whatever) when performing XPath queries. I do understand why namespaces are necessary or at least beneficial, but why is it so complex? In order to query a simple XML Document (no namespaces)... <?xml version="1.0" encoding="ISO-8859-1"?> <rootNode> <nodeName>Some Text Here</nodeName> </rootNode> ...one can use something like doc.SelectSingleNode("//nodeName") (which would

How to remove xmlns attribute from XDocument?

眉间皱痕 提交于 2019-11-29 18:32:12
问题 In my C# codebase, I have an XDocument of the form: <A> <B> <C xmlns='blabla' yz='blablaaa'> Hi </C> <D xmlns='blabla' yz='blablaaa'> How </D> <E xmlns='blabla' yz='blablaaa'> Are </E> <F xmlns='blabla' yz='blablaaa'> You </F> </B> <B> <C xmlns='blabla' yz='blablaaa'> I </C> <D xmlns='blabla' yz='blablaaa'> am</D> <E xmlns='blabla' yz='blablaaa'> fine</E> <F xmlns='blabla' yz='blablaaa'> thanks</F> </B> Using Linq-to-XML or otherwise, I wanted to remove the xmlns for all the elements

JSF - xmlns:h not being recognized? [duplicate]

对着背影说爱祢 提交于 2019-11-29 18:14:34
This question already has an answer here: JSF returns blank/unparsed page with plain/raw XHTML/XML/EL source instead of rendered HTML output 1 answer In the "search" XHTML portion of my project, the "h" tags arent being recognized. I really have no clue why they aren't working. Any insight? Here's a link to the xhtml file hosted on google code so the entire project can be viewed. https://code.google.com/p/xdsgui/source/browse/trunk/Frontend/WebContent/search.xhtml Thanks. They are supposed to be parsed by the FacesServlet . If they appear unparsed in the retrieved HTML output, then it simply

Parsing Data in Xamarin Forms

北慕城南 提交于 2019-11-29 18:00:20
I would like to get the names in collection href(CustomerDemographics, Customers, Employees, Order Details) to populate a listview. I would like to know how to parse these information in Xamarin platform or C#. I am quite new on this environment. I have experience how to parse json data in native ios with objective c, but it is the first time I see this type of data. From the attached image it seems that you're requesting the service document of the OData service. Namely the http://host/service/ endpoint of the service. If you would like to get the content of the collections, you should append

edit xml file using c#,getting error invalid token

蓝咒 提交于 2019-11-29 17:21:30
My Problem Is My XML file having Two namespace ,so i cant change text of xml in SelectingNode Method XmlTextReader reader = new XmlTextReader("C:\\test.xml"); XmlDocument doc = new XmlDocument(); doc.Load(reader); //Assuming reader is your XmlReader XmlNamespaceManager oManager = new XmlNamespaceManager(doc.NameTable); oManager.AddNamespace("ns", "http://schemas.microsoft.com//sqlserver//reporting//2005/01//reportdefinition"); oManager.AddNamespace("rd", "http://schemas.microsoft.com//SQLServer//reporting//reportdesigner"); doc.SelectSingleNode("/ns:Report/ns:buttons/ns:workshop1", oManager)

How to remove namespace from the output xml?

天涯浪子 提交于 2019-11-29 17:06:37
问题 Below is my xsl <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ms="http://www.test.com/schemas/test" xmlns:ns="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="ms ns"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <XMLResponse> <xsl:apply-templates select="ms:ProductRS/ms:Product"/> </XMLResponse> </xsl:template> <-- some templates here --> </xsl:stylesheet> In the output i

SimpleXMLElement Access elements with namespace?

馋奶兔 提交于 2019-11-29 16:57:23
I have the following XML: <ns1:getBannerLinksResponse xmlns:ns1="http://endpoint.website.com/"> <ns1:return> <ns1:campaignID>0</ns1:campaignID> <ns1:categoryID>200230455</ns1:categoryID> <ns1:categoryName>Promotion</ns1:categoryName> <ns1:linkID>10001599</ns1:linkID> <ns1:linkName>KFL-20% off No Min</ns1:linkName> <ns1:mid>3071</ns1:mid> <ns1:nid>1</ns1:nid> <ns1:clickURL> http://someurl </ns1:clickURL> <ns1:endDate>Oct 15, 2012</ns1:endDate> <ns1:height>250</ns1:height> <ns1:iconURL> http://someurl </ns1:iconURL> <ns1:imgURL> http://someurl </ns1:imgURL> <ns1:landURL> http://someurl </ns1