xml

How to stop XSL unescaping URLs

I am using XSL to display an XML representation of an email message in browsers. Email attachments are stored in separate files to the main email XML file, and so I want the resulting web page for the email to contain a link to its attachments. However some of the attachments are email messages themselves, and may have been forwards or ...

PHP XML node deletion

i have an XML file with large number of tags. it has more than 2000 tag here and there. i want to delete all that htmlText Tag and save it as a new xml. how cani do that in PHP??? here is the code tht iam using $remove = $doc->getElementsByTagName('htmlText'); $doc->removeChild($remove); ...

is htmlspecialchars suficient to escape XML element content in HTTP response?

I'm returning an UTF-8 XML response and some elements have user provided content, so I must ensure they are properly escaped. Is using htmlspecialchars(..., ENT_COMPAT, 'UTF-8') enough for a proper escape of an XML element text? ...

ASP.Net mvc building an xml data feed for a chart

I have to build an xml output that represents a data structured for a flex chart placed in the view. I have several options: have the controller create the xml (using data from the DB), and return it to a view that actually does nothing, since everything is ready. have the view strongly typed to the data model from the DB, and render t...

< & > are converted to &gt; &lt; etc

I am using MSXMl library to parse xml after I call put_text and then get_xml the output will have < & > converted to &lt; & &gt; How can i get rid of this? ...

Is this the right exception?

I parse an XML file to load data, and when i have an attribute that has an unrecognized value, i throw an InvalidDataException. Is this the correct one or is there a better/more descriptive one ...

Make a site automatically choose between the WAP or normal version?

I have a website with the following files in the root folder: index.wml index.php How do I get it to open index.php if you are accessing via non-wap browsers, but open index.wml automatically when it is a wap browser. I suspect something must go in the .htaccess file? ...

Generating C# helper classes with XSD.exe: Failed handling imported schemas

I would like to produce C# helper files from the KML2.2 xml schema using the XSD.exe tool (from VS2008 SDK). With KML2.1, the tool worked just fine. However, the KML2.2 schema contains import tags pointing to other schemas causing XSD.exe to freak out. This is the error message I get: C:\Program Files\Microsoft Visual Studio 2008 SDK...

configure service using a web interface

I have the following cenario. I created a server component running as a service. Now I want to build some configuration user interface. I have seen with my nvidia firewall that they are running a apache instance and offer a full featured user interface inside my webbrowser. If I want to do soemthing like this what technology would be f...

Inserting URL Values into XML Page

I trying to write a php page that will take url values and insert them into an xml file. Any sample files would be of great help. ...

xslt sorting

I have a list of items being returned in xml. each item has various elements. one of the elements is "Position" which takes a value between 0-6 if Position is 0 then the item should not be shown, but if its between 1 and 6 I need it to be shown. how can i do the xslt so that it will list the items by order of "Position" ...

What is an appropriate XML type for web service?

Current Implementation Sql Server 2005 Database with a table called messages with a column called MessageXml of type xml. C# Library project with a Linq to Sql class that generates a class called Message with a field called MessageXml of type XElement. WCF Webservice that exposes a MessagePayload class with a property called MessageXm...

Problem inserting XML parsed data in MySQL tabel.

Hello I am trying to parse XML using PHP DOM and then insert this data in MySQL tables, i am using the following code for this: <?php $xmlDoc = new DOMDocument(); $xmlDoc->load("testrtap11.xml"); mysql_select_db("zeeshan_database1", $con); $x=$xmlDoc->getElementsByTagName('RECORD'); $z=$xmlDoc->getElementsByTagName('TITLE'); $w=$xmlD...

extract text using xslt

one of my elements from xml is an image and when i do <xsl:value-of select="MyImage" /> it outputs this as the data <img alt="" border=0 src="/PublishingImage/myPic.jpg" style="border:0px solid"> using xslt can i extract just the src bit so that i have /PublishingImage/myPic.jpg without the quotes. ...

inserting XML elements in freemarker template using XPath

I'm using freemarker to do some XSLT-like transformations. I've created a working template, but it's ugly (see the example). But some of the elements aren't being transfomred at all. Is there a way I can use XPath expressions to insert entire elements into the XML? For example, <Root> <A> <B>bb</B> <c>cc</c> </A> <D> etc </D> <...

[XSLT] Creating a recursive XSL:If statement?

I'm trying to set up an XSL:IF statement that only shows entries that have a node that falls between two values. Simple enough, right? It's just a if greater than and if less than. Problem is, instead of testing it against one node I need to test it against up to 52. Let's say I have some XML that looks like this: <container> <entr...

¿What is the best way to Create a Xml Document conforming to a XSD Schema?

Well, I have a XSD and I have to generate a XML document for send to the customers of the company I work with. The Documents I send will be validated against this XSD schema. What is the best way to Create a Xml Document conforming to a XSD Schema? I mean, i'm searching for best practices and the like. I'm new to this and "googling" aro...

MSXML2.DomDocument.3.0 invalid characters

Hello, I'm receiving the following error when parsing XML as answer from a webservice. An invalid character was found in text content. The webservice sends answers with some characters as Ψ for example or HTML structured tests malformed with " or < and > characters. The code used is: Set var_xmlPostObject = CreateObject("MSXML2.Ser...

Windows media server doesn't stop after playing 1 file from list

I'm playing Windows Media audio, triggered by an ASX meta-file which looks like this: <asx version="3.0" BannerBar="none"> <title>Foo</title> <author>Bar</author> <copyright>Baz</copyright> <moreinfo href="http://company.com/"/&gt; <entry> <title>Audio Stream</title> <ref href="mms://media1.company.com/bof.asf"/> </e...

Filtering a datasource by range in the Symphony CMS

I'm currently working on a website and have run into a major problem. In a recent question I asked how to filter my XML with XSLT based on the content of a series of XML nodes. The end result was this: <xsl:if test="listings/entry[available-weeks/item[number(.) &gt;= {$url-min} and number(.) &lt;= {$url-max}]]"> //my listings show h...