xml

In C#, sign an xml with a x.509 certificate and check the signature

Hi I'm trying to sign an XML file using a x.509 certificate, I can use the private key to sign the document and then use the CheckSignature method (it has an overload that receives a certificate as parameter) to verify the signature. The problem is that the user who validates the signature must have the certificate, my concern is, if t...

reading two rss/xml files in a single php page

I have a script where i need to pull two seperate and different RSS feeds, break them up, assign variables, and execute code thats different for each file. What im wondering, and i dont know if this can even be done, but once i use a function and give it settings, can i then re-use that function with different settings even though some ...

Typed Dataset with null values to XML

When a typed DataSet is written to XML using ds.GetXml the columns with null values are removed from the XML. I know this is because the schema is not written etc. but is there a way to override this without having to parse through the DataSet and convert all database nulls to empty string before writing the XML? EDIT: additional info...

SOAP PHP Parsing Error?

I'm communicating with a SOAP service created with EJB -- it intermittently fails, and I've found a case where I can reliably reproduce. I'm getting a funky ass SOAP fault that says "looks like we got not XML," however, when retrieving the last response I get what is listed below (and what looks like valid XML to me). Any thoughts? ...

OK to put comments before the XML declaration?

Is it OK to put comments before the XML declaration in an XML file? <!-- Is this bad to do? --> <?xml version="1.0" encoding="utf-8"?> <someElement /> ...

How to properly format a SOAP message envelope using a custom SOAPHandler

I have a class that implements the SOAPHandler interface. The handleMessage is defined as: public boolean handleMessage(SOAPMessageContext context) { SOAPMessage msg = context.getMessage(); SOAPPart part = msg.getSOAPPart(); SOAPEnvelope envelope = part.getEnvelope(); // add namespaces SOAPElement envelope.addNamespaceDecla...

How to do encryption/decryption in xml with StAX?

Hi, One of the reason I use StAX is because of it low memory consumption in processing large xml files. I've been requested to encrypt the whole xml files, and decrypt them later. The easier solution I can come up with, without having major change to existing code, is encrypt content only. xsw.writeStartElement("row"); xsw.writeC...

xml validator source code in C

Hi, I am looking for a C source snippet to validate XML string fromat. ex: Generalised source which checks for xml formatting. 10 must give an error for format. Thnx ...

XML schemas with multiple inheritance

Is it possible to have multiple inheritance in XML schemas, if so how? Example <xs:schema xmlns:xs="http://www.w3.org/2001/Schema" ....> <xs:complexType name="Account"> <xs:sequence> <xs:element name="balance" type="xs:decimal"/> <xs:element name="accountNo" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:c...

Read XML file using javascript.

Hi friends, My XML file format is as below. <markers> <marker> <type></type> <title></title> <address></address> <latitude></latitude> <longitude></longitude> <marker> <marker> <type></type> <title></title> <address></address> ...

Recommend XML Difference open source Java libraries?

I have a requirement to compare two XML documents and report differences. String comparison is not sufficient as I want to be able to say that: <Foo/> is the same as <Foo></Foo> Anyone used a library they would recommend? ...

How to echo xml file in php

How to print an xml file to the screen in php? This is not working: $curl = curl_init(); curl_setopt ($curl, CURLOPT_URL, 'http://rss.news.yahoo.com/rss/topstories'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec ($curl); curl_close ($curl); $xml = simplexml_load_string($result); echo $xml; I...

Writing SQL function with XQuery Parameters

Following on from one of the answers in this thread; http://stackoverflow.com/questions/214060/using-xquery-in-linq-to-sql/214435#214435 I'm trying to create a sql table function that will take parameters in order to perform queries on xml data. The function can then be consumed by a linq query. Issue's i'm having are ; If i take th...

VBScript, MSXML and Namespaces

Given the following XML: <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <soap:Body> <GetMsisdnResponse xmlns="http://my.domain.com/"&gt; <GetMsisdnResult> <RedirectUrl>ht...

How to work with an embedded XML and XSL file

I am trying to create an embedded file containing both XML and XSL. The test is based on "XML and XSL in one file" on dpawson.co.uk. The source looks like this: <?xml-stylesheet type="text/xml" href="#stylesheet"?> <!DOCTYPE doc [ <!ATTLIST xsl:stylesheet id ID #REQUIRED> ]> <doc> <xsl:stylesheet id="stylesheet" ver...

WiX XmlFile ElementPath multiple results

I've just used the WiX XmlFile element with an ElementPath that matches multiple XML nodes and it just updates the first one, rather than all of the ones that match. Is this a bug in WiX? Can anyone suggest a workaround for this? ...

How to get lxml working under IronPython?

I need to port some code that relies heavily on lxml from a CPython application to IronPython. lxml is very Pythonic and I would like to keep using it under IronPython, but it depends on libxslt and libxml2, which are C extensions. Does anyone know of a workaround to allow lxml under IronPython or a version of lxml that doesn't have th...

For-each inside another For-Each and access a attribute defined in the first loop using the value of the second

For-each of a collection of headers and find a certain attribute in another collection of Items. If I have something like: <ROOT> <Listings> <Listing> <Headers> <Header width="3cm" value="UserName" /> <Header width="3cm" value="MobileAlias" /> <Header width="3cm" value="Name" /> <Header wid...

How should I manage different incompatible formts of Xml based documents

I have an application which saves documents (think word documents) in an Xml based format - Currently C# classes generated from xsd files are used for reading / writing the document format and all was well until recently when I had to make a change the format of the document. My concern is with backwards compatability as future versions ...

Why do interviewers ask advanced questions?

I've been programming for a few years in C# and XML. I used only the basics of those languages and have survived on the web for info like arrays and text manipulations. But when I am get interview, the interviewers ask only advanced questions - I found the answers later in the Advanced sections in the books on the subject. Why do the i...