xml

Creating a Custom DTD for Visual Studio

I've got some custom templated controls which take JavaScript as template content, like so: <ns:Custom runat="server"> <contentTemplate> var a = new Array(); for (var i=0; i<a.length; i++) { // do something } </contentTemplate> </ns:Custom> I want VisualStudio to treat the content of exactly the same as it does ...

Producing a Windows Path from an XML URI

What is the proper way to convert an XML URI into a Windows file path? As a starting point, it's possible to turn: file:///C:/DirA/DirB/File.txt into: C:\DirA\DirB\File.txt ... by first dropping the file:/// substring (having used it to determine we're dealing with a local file) and then placing a backslash wherever a slash appear...

Load nested XML into dataset

How do I load the following nested XML into a DataSet? <items> <item> <id>i1</id> <name>item1</name> <subitems> <name>subitem1</name> <name>subitem2</name> </subitems> </item> <item> <id>i2</id> <name>item2</name> <subitems> <name>subitem1</name> <name>subitem2</name> </subitems> </item> ...

How to write relative unix path in xml

hi all, when i run a process in unix the path points to /abc/1/2/3 I am setting a property in an xml for a process which run in path. One property i have < property name="log.path" value="/abc/4/5"/ > Problem is that i cannot give absolute path("/abc/1/2/3") as above. i have to give something like "../../../4/5". < property name=...

Is Apache XML security library compatibile with IBM's JDK

I developed an application that uses Apache XML security library for xml encryption and signing. It runs on SUN's JDK without any problems, however, IBM JDK gives me tons of problems. It doesn't sign right (validation fails), pkcs11 provider fails to encrypt. It seems that problem is because IBM provides their own security providers. ...

XmlSerializer: remove unnecessary xsi and xsd namespaces

Is there a way to configure the XmlSerializer so that it doesn't write default namespaces in the root element? What I get is this: <?xml ...> <rootelement xmlns:xsi="..." xmlns:xsd="..."> </rootelement> and I want to remove both xmlns declarations. Duplicate of: How to serialize an object to XML without getting xmlns=”…”? ...

xslt: How can I create a dynamic table?

Given this xml <Documents> <Section> <SectionName>Green</SectionName> <Document> <FileName>Tier 1 Schedules</FileName> </Document> <Document> <FileName>Tier 3 Schedules</FileName> </Document> <Document> <FileName>Setback Schedule</FileName> </Document> <Document> <FileName>Tier 2 Governance</...

Is there anyway to use E4X in PHP?

I am primarily an ActionScript programmer and I love working with XML using E4X. I also use PHP a lot but am currently too intimidated to process XML with PHP, I was wondering if there was a way to use E4X in PHP? Thanks. ...

Consuming Database Result Sets with Silverlight DataGrid

So I have a WCF Service that gets a result set from a database (not SQL) - I can get this data as a DataTable, string[][], etc. I can't use LINQ or ADO.NET Entity Framework very easily as it's not coming from an SQL DB. So my question is: -What's the best way to package this data for transmission across the wire? I can use any data...

XML Serialization of DOM Portions with Xerces C++

I've been struggling quite a bit with Xerces C++ and my unfamiliarity with all that is XML, but I need to use XML for a project I'm working on. My question is how do I serialize portions of a DOM tree that I have already parsed and created of out of a XML instance document (validated against a schema I wrote) so that I can create many n...

Can PostgreSQL select from an array returned by a function?

This query fails: SELECT xpath('/my/xpath/expr', my_xml)[1] FROM my_table ERROR: syntax error at or near "[" But this one works: SELECT x[1] FROM (SELECT xpath('/my/xpath/expr', my_xml) as x FROM my_table) as ss My xpath expression always returns only a single value, but the Postgres xpath function returns an array. I want t...

tool to generate xml file from xsd (for testing)

I have an xsd file and have not done much xml manipulation, parsing, etc. I want/need test xml files for my code but don't have any samples. (I am using xerces to parse) This is similar to: xml-instance-generation-from-xml-schema-xsd but I don't really want to make it a two step process. (python or java) I just want to feed xsd fi...

Minimize the info in a signature segment using RSACryptoServiceProvider

I have a XML file that looks like this <Licence> <Name>Test company</Name> <Version>1.1.1.1</Version> <NumberOfServer>2</NumberOfServer> </Licence> I then use a previous generated private key to sign the XML file using the foloowing code private void SignFile(XmlDocument doc) { SignedXml signedXml = new SignedX...

Would you be OK with this way of verify a license?

I have a XML file describing the name of the company the product is licensed for, the version and some extra information. Looking something like this <Licence> <Name>sdfsdf</Name> <Version>1.2.1.1</Version> <NumberOfServer>4</NumberOfServer> </Licence> I then sign this fiel using a private key and get <Licence> <Name>sdfsdf<...

How to upload a BitmapData Object straight to my server?

Hello all, I wish to upload from my Flash Application (AS3) to imageshacks XML API. I wish to know how I can do this. "In Flash, we must POST the data using the UrlRequest and UrlLoader classes, however we run into a limitation of the Flash API. The data property of a UrlRequest can either be a UrlVariablesByteArray object. There is no...

Navigating XML from Objective-C

Hi, I'm getting this XML response from TwitPic: <?xml version="1.0" encoding="UTF-8"?> <rsp stat="ok"> <mediaid>abc123</mediaid> <mediaurl>http://twitpic.com/abc123&lt;/mediaurl&gt; </rsp> I want to access the value within the 'mediaurl' tags. So I tried: NSString *twitpicURL = [[request responseHeaders] objectForKey:@"m...

Store data in C# source files vs. XML etc...?

This is a C# question. I was just wandering if anyone tried storing their data (like config files for example), in the *.cs file, instead of XML? I really hate XML. The whole idea of parsing html-like structure every time you need some data seems stupid. Are there lightweight alternatives (like YAML) to XML? In my case I actually need...

What's the best way to test an Atom Server?

Hi all, I'm setting up an Atom server to act as a REST-ful interface to my backend database. I'd like to put together some tests to ensure: - the output is Atom and AtomPub compliant - the data produced is a correct representation of the state of the database I'm comfortable enough with the concept of setting up the database in a known...

Concerned with writing xml

hi guys I have a mail application. While sending to each recipient I am writing to an XML file named mail.xml. I use the following code: Dim from As String = txtFrom.Text Dim txto As String = txtTo.Text Dim subj As String = txtSubject.Text Dim body As String = txtBody.Text Dim settings As New XmlWriterSettings() settings.Indent = T...

Xml Escaping/Encoding terminology

I'm confused as for the difference between the terms "escaping" and "encoding" in phrases like: Xml Encoding Xml Escaping Encoded Html Escaped Url ... Can anyone explain it to me? ...