xml

Where should I put a URI declaration for a namespace in an XML doc?

I am currently building an XML schema, with a head, a body, and potentially errors. I am dividing those three parts into different namespaces, so I'm wondering where and when I should put the URI namespace declarations in. For example, should it be: <head:schema xmlns:head="http://mywebsite.com/ns/head/" xmnls:body="http://mywebsite.co...

Correct way to retrieve collection using XPath?

Hi, all. I've got an xml file of several recordings that looks like this: <audiolibrary> <prompt name="accountinfo"> <prompt-segment> <audio src="audio/default/accountinfo.wav" text="Account Information"/> </prompt-segment> </prompt> ... <prompt name="accountclosed"> ...

Conditional XPath matching

I have some xml that looks like this... <tbody> <tr> <td> <h5> <a class="foo" name="bar">This is the element I want to condition on.</a> </h5> </td> </tr> <tr> <td> <a href="/generic/generic">This is the element I want to match on</a> <td> <td></td> ...

Can I use conditional branching in xml email templates

I want to have generalised email templates. Currently I have multiple email templates with some part of the subject and body being changed. I would like to club them together with some conditional branching like, <email> <sub> if(condition) sub1 else sub2 </sub> <body> some text ...

Consuming XML from a file/URL without a .xml extension in Flash

Does flash specifically prevent the consumption of XML from files/URLs without a .xml extension for some reason? I have verified the output of the URL is valid XML for my purposes but the Flash will not recognise it. ...

SOAP PHP : Generating a complex array to pass to web service

Hi. 2 distinct problems. I'm using the PHP SOAP class to pass some XML to a webservice. I can generate simple arrays just fine, and these work perfectly with the webservice. 1.When I try to generate a complex (arrays within arrays) query I'm getting errors. 2.Also I don't understand how to insert a parameter(???) into an XML tag. B...

hot to date indide paramter in xml

Hi Guys, i made this code for inserting data to an system mail that know to work with xml file. the problem is that i try to create some javascript code for getting the current date of day, and then put it inside the filed date, but without success. i know hot create the date in javascript, my problem is in thx xml file, i mean how ca...

String tokenisation algorithm won't tokenise

Morning all, I am writing a bash script to extract the values of certain XML tags from all files in a given directory. I have decided to do this by tokenising each line and returning th4e relavent token. The problem is that it isn't tokenising correctly and I can't quite work out why. Here is the smallest example that I could make tha...

How can I easily store my C# data structure(XML serialiazable) into a database?

I have a C# data structure which consists of classes and collections which have references to each other. Currently I am using Serialization to store the structure in XML, which works as a handy way to save/load the structure into my application. If I want to be able to save/load the structure into a database, is there a simple way? Sho...

Is it a good idea to use XML files to present data that is not updated often? VS MYSQL query

Hi, I'm building my website and I'd like to limit calls to my MYSQL database. One idea I have is to use XML files to present information that does not need to be updated as regularly as every page load. Two example are Site navigation which might only change once a week. The number of items in stock which will in most situations on...

I have an iframe which content I need Google to index. Is this possible?

I have a classifieds website. The index.html has a form: <form action="php_page" target="iframe" etc...> The iframe displays the results, and the php_page builds the results for the iframe. Basically the php_page builds a table containing the results from a mysql db, and outputs it. My problem is that this doesn't get indexed b...

set size of image with xsl

I have a XML that contains img tag <xml> <img src="/path/to/file.jpg" orginalwidth="150" /> </xml> I want to have: <img src="/paht/to/file.jpg" size=SIZE /> Where SIZE is minimum of orginalsize and 100px ...

ASP.NET to Powerpoint. File gets corrupted when adding image

Hi I have used this example when exporting data to powerpoint: I have modified the GenerateSlidesFromDB() method: public void GenerateSlidesFromDB() { string slideName = @"C:\Users\x\Desktop\output.pptx"; File.Copy(@"C:\Users\x\Desktop\Test.pptx", slideName, true); using (PresentationDocument presentatio...

Android gesture detect problem

I have a my main.xml as a ViewFlipper which imports 5 views for my program. If I wrap the whole main.xml in GestureoverlayView I can detect gestures just fine with my listener, however, it displays the gesture on the screen. I don't want the gestures shown i just want them detected so I tried applying the touch listener to the ViewFlipp...

Error in formating of XML string with CDATA

I get this error "Start tag on line 1 does not match the end tag of 'document'". string rawXml = "<?xml version='1.0' ?>" + "<document>" + "<![CDATA[" + "<topic>" + "My test" + "</topic>" + "]]>" + "</document>"; Error occurres when I try to...

Is there a command that can be run from a cygwin shell to print out an xml file with color highlighting?

Is there a command that can be run from a cygwin shell to print out an xml file with color highlighting? ...

Adding a SOAP / XML parameter in PHP

Hi I am using SOAP in PHP. At the moment I am submitting the tag <TAG>DATA</TAG> But I want to submit <TAG parameter=value>DATA</TAG> For the life of me, I can't find out how to do this. I don't even know what this parameter=value pair is referred to as? Can anyone help please? ...

Make a C# call from XML or just set path as application path in XML

Hey I'm connecting to a .sdf database file and i need it to be generic project wide, no matter what computer the project is on. Currently I cana cheive this in C#/ASP.NET witht he following code: "Data Source=" + (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "/dbmon.sdf;Passwor...

HTML text in xliff file

I need a way to have text that may include bullets in a XLIFF file (so that it is translateable and load it in a dynamic text field using as2. I was informed that using CDATA in the XLIFF file was a bad idea so I came up with a work around where in place of <li> tags I have [*] & [/*] In the flash I am replacing these with list item...

.NET: Posting Xml to a web-server?

What is the proper way to post an XmlDocument to a web-server? Here is the skeleton function: public static void PostXml(XmlDocument doc, String url) { //TODO: write this } Right now i use: //Warning: Do not use this PostXml implmentation //It doesn't adjust the Xml to match the encoding used by WebClient public static void Po...