I'm working with some SQL Report definition files (RDLs), using LINQ to extract component query statements for validation. I'm trying to extract the <DataSet> elements from under the <DataSets> element. I seem to be getting hung up with one of the elements under <DataSet><Fields><Field> which has a namespace qualifier <rd:TypeName>
I've...
I am transforming some XML using XSLT and Saxon like this:
Source sourceXML = new StreamSource(...);
Source sourceXSLT = new StreamSource(...);
System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl");
TransformerFactory transFact = TransformerFactory.newInstance();
Templa...
Okay, this is starting to drive me a little bit nuts. I've tried several xml/xpath libraries for Python, and can't figure out a simple way to get a stinkin' "title" element.
The latest attempt looks like this (using Amara):
def view(req, url):
req.content_type = 'text/plain'
doc = amara.parse(urlopen(url))
for node in doc.x...
Hi All, I would like to have a few namespaces available by default when running an XQuery in SQL Server 2005, is this possible?
For example, I would like to do the following:
select * from TableWithXML
where
FieldWithXML.exist(
declare namespace nsp="http://www.example.com/exampleNamespace";
nsp:root/nsp:childnode) = 1
Without having...
I'm not sure if that is possible, as I'm very new to XSLT and stuff, but maybe some of you could help me here? It's a bit tricky and I haven't found anything like it on the internet:
The problem is that I have an input xml with namespaces declared and all and I only need to make slight changes to it (adding or deleting attributes, or sh...
I'm implementing a homebrew subprotocol of XMPP, and i'm using combination of StAX and JAXB for parsing/marshalling mesages. And when I marshall a message I end up with loads of unneded namespace declarations:
<ns2:auth xmlns:ns2="urn:ietf:params:xml:ns:ilf-auth"
xmlns:ns4="ilf:iq:experiment:power" xmlns:ns3="ilf:iq:experiment:i...
I'm working with eBay's LMS (Large Merchant Services) and kept running into the error:
org.xml.sax.SAXException:
SimpleDeserializer encountered a child
element, which is NOT expected, in
something it was trying to
deserialize.
After alot of trial and error I traced the problem down. It turns out this works:
<?xml version="...
What is the difference between the following pieces of xml?
The reason I ask is that when I submit the xml to a BPEL process the first and second one work but the last one does not, what is going on?
<!-- imported namespace referenced with prefix -->
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http:...
I set my DataContracts namespace to "" which removed one namespace but I have to remove the other:
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
If theres no other way, how can I serialize my class prior to returning and hack out the namespace?
I have to do this to work with another companys API.
...
Given the following XML markup:
<root xmlns="Demo">
<child name="foo"/>
</root>
and an XPathNavigator positioned on the <child> element,
string withNs = navigator.GetAttribute("name", navigator.NamespaceURI);
string withoutNs = navigator.GetAttribute("name", "");
produce strange results: withNs is empty, withoutNs contains foo....
Anyone knows the problem why linq to xml or xpath extensions cant seem to read this xml?
http://www.quillarts.com/Test/product.xml
var document = XDocument.Load(feedUrl);
var xpathxml = from feed in document.XPathSelectElements("//Products") //using Xpath
var linqtoxml = from feed in document.Descendants("Products") //using Linq2XML
...
Hi
I’m new to XML and am currently learning about Document Type Declaration. Anyways, when declaring elements in the body of DTD, the element name must appear exactly as it will within the XML document, including any namespace prefix, which means users can’t define their own namespace, but must use the prefix defined within DTD.
a) I...
Evening guys.
Firstly to say, I have read http://stackoverflow.com/questions/1133897/how-do-i-parse-xml-containing-custom-namespaces-using-simplexml.
I'm parsing an XML document from a source not mind, and they use a custom namespace.
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:moshtix="http://www.moshtix.com.au"&g...
I have an xsd document that starts with:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<xs:complexType name="T_segment">
<xs:sequence>
<xs:el...
Guess the title says it al, somehow my xslt transformation with php always adds xmlns="" as an attribute to all root elements. Is there a way to prevent this?
...
I'm trying to create an XML file using C# and Linq to XML, but am having problems with the nant namespace.
var myXElement = new XElement("project", new XAttribute("name", "MySystemName"), new XAttribute("default", "myNAntTargetName"), new XAttribute("xmlns", "http://nant.sf.net/schemas/nant.xsd"));
myXElement.Save("c:\foo.xml");
Beca...
I have two schemas A and B with a circular dependency (it's an intermediate step). The XML files I'm using as input validate against the schema according to xmllint and Visual Studio. Eclipse is telling me that both schemas contain two global components with the same name.
A.xsd:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"...
I am implementing a javascript library that talks to a SOAP webservice. I use the XMLHttpRequest to do requests and receive responses. The SOAP responses rely heavily on multiple namespaces.
For all major browsers, except all versions of Internet Explorer, I can use getElementsByTagNameNS() and getAttributeNS() to traverse and parse th...
Hi, everybody!
I have a .Net web services that are called from flex. Our programmer receives the following xml when calling web service function:
<FunctionName xmlns="WSNamespace"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSc...
I'm using XOM with the following sample data:
Element root = cleanDoc.getRootElement();
//find all the bold elements, as those mark institution and clinic.
Nodes nodes = root.query("//*");
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml">
<head>
<title>Patient Information</title>
<...