Skip to main content

Questions tagged [xml-namespaces]

According to the standard, "XML namespaces provide a simple method for qualifying element and attribute names used in Extensible Markup Language documents by associating them with namespaces identified by URI references."

-1 votes
0 answers
28 views

How to construct XML node from string with namespace?

I am trying to create a xmlNode from an XML string with xmlParseBalancedChunkMemory but when the XML string containing a prefix/namespace in it, libxml2 would throw error 201 (...
codenamezero's user avatar
  • 2,950
0 votes
2 answers
36 views

How to register default NS in libxml2 for C++?

Question: What is the correct way to register the default NS for XPath context? I've gone through numerous posts (mostly non-C++ and Google search) about registering NS, but I cannot find anything for ...
codenamezero's user avatar
  • 2,950
0 votes
1 answer
49 views

C# Linq to XML - Keeping namespaces in parent nodes while removing them from child nodes

So I have this XML tree created through LINQ to XML, like this: XNamespace xNamespace = "urn:OECD:StandardAuditFile-Tax:PT_"; XElement main = new XElement(xNamespace + "...
MuchoG's user avatar
  • 55
1 vote
0 answers
22 views

In PHP, xml namespaces are being redeclared when the namespace prefix is changed

In my document type declaration, I have the following: <!ELEMENT all:Test (div)> <!ATTLIST all:Test xmlns:all CDATA #FIXED 'http://www.mrinitialman.com/' xmlns CDATA #FIXED 'http://...
MrInitialMan's user avatar
0 votes
0 answers
60 views

Force python to write namespace in root tag

I'm using python to generate an XML document for a third party. The third party has very precise ideas about how the final xml file shall look like. In my case it wants me to define a namespace in the ...
principal-ideal-domain's user avatar
0 votes
1 answer
31 views

xmllint --xpath for <rdf:RDF><channel><title>

I have looked through every answer in these first three search pages and cannot get a solution; after page 2 questions aren't even relevant. In this RSS feed: <?xml version="1.0" encoding=...
Jesse's user avatar
  • 816
1 vote
2 answers
84 views

How to parse data from an xml file in a shell script

I have this xml file, and i am trying to use xmllint or grep to get an out put like this availStart="2024-05-24T05:00:30" availId="811220455" q1:campaignIdRef=180398 availStart=&...
Hasham1983's user avatar
1 vote
1 answer
51 views

Problems deserializing XML files with nested namespaces

I have the following XML file (excerpt): <AutoindexBundle xmlns:i="...www.w3.org/2001/XMLSchema-instance" xmlns="...dev.mysite.com/settings/settingsExchange"> <...
Hofi61's user avatar
  • 11
1 vote
0 answers
26 views

Go/Xml Namespaces

I'm defining an XML structure in Go using the encoding/xml package where the XML name contains the URL of the xsi and xsd namespaces. Here's my struct: struct: type MensagemEnvioANS struct { ...
Daniel Najatec's user avatar
0 votes
0 answers
144 views

Handling XML default namespace in Python using Pydantic

I am trying to convert some JSON data into XML in Python using the Pydantic-XML library (https://pydantic-xml.readthedocs.io/en/latest/index.html). However, I am having trouble getting the default ...
dksr's user avatar
  • 356
1 vote
1 answer
71 views

XML default namespace vs prefix namespace declarations

I'm required to produce a schema that will generate XML outputs that has 3 different namespaces, but there should not be any prefixes used to reference the elements or namespace. More specifically, it'...
Sam CMS's user avatar
  • 11
1 vote
1 answer
93 views

How to Deserialize XML into C# object ignoring xmlns? [duplicate]

Given the following XMLs, how could I deserialize them to the same C# object? Version 1.1 is essentially backward compatible to 1.0 so I don't really care about the xmlns value but C# thinks otherwise....
codenamezero's user avatar
  • 2,950
1 vote
1 answer
73 views

XML namespaces default vs namespace prefix

My colleague has given each element in a payload a namespace ns0 for best practice, and my parser stopped working. Reading more on the topic, it seems that declaring each element the namespace is not ...
David Garcia's user avatar
  • 3,174
0 votes
1 answer
52 views

Possible namespace issue with xpath query

I'm using this as a reference to creating the below xpath query in postgresql. WITH cte AS ( SELECT message::xml as res FROM messages_table a WHERE a.id = '123' ...
runnerpaul's user avatar
  • 6,708
0 votes
1 answer
77 views

How to use Name Space in XML selectNodes and selectSingleNode

I'm porting an VBA Access Application from Win7 to Win11 and I think there should be a way to do it more elegant. I have to read this .xml file: <?xml version="1.0" encoding="UTF-8&...
Blacksmith's user avatar

15 30 50 per page
1
2 3 4 5
164