I am not that good with encoding but I am even falling over with the basics here.
I am trying to create a file that is recognised as UTF-8
header("Content-Type: text/plain; charset=utf-8");
header("Content-disposition: attachment; filename=test.txt");
echo "test";
exit();
also tried
header("Content-Type: text/plain; charset=utf-8");...
I have a C# class that is serialized like this:
<oadResults
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.tyr.org.uk/standards"
>
<Link>http://www.tyr.org.uk//290/Data.zip</Link>
<ID>3540</ID>
</oadResults>
And I have a XSLT file:
<xsl:stylesheet ...
Hello everybody,
I need to send xml to the browser with my jsf application. This xml is generated by the application.
I try to create it but my jsf application sends html every time.
How can I change the content-type to send xml ?
Thanks for your help.
...
Hi,
I have a XML file of the format:
<outer1>
<inner1>
<name>Stonecold</name>
<profession>warrior</profession>
<org>wwf</org>
</inner1>
<inner1>
<name>Shanebond</name>
<profession>Bowler</profession>
<org>newzealand</org>
</inner1>
<inner1>
<name>brain schemidit</name>
<profes...
I have an HTML document stored in memory as an Linq-to-XML object tree. How can I serialize an XDocument as HTML, taking into account the idiosyncrasies of HTML?
For example, empty tags such as <br/> should be serialized as <br>, whereas an empty <div/> should be serialized as <div></div>.
HTML output is possible from an XSLT styleshe...
This is the XML file:
<?xml version="1.0" encoding="utf-8" ?>
<Books>
<Book id="1">
<Author>Mark</Author>
<Publisher>Sams</Publisher>
</Book>
</Books>
This is the code to extract the attribute:
XmlTextReader textReader = new XmlTextReader("D:\\books.xml");
textReader.MoveToElement();
string ...
OK, I asked for how to return a Linq query results as XML, and I got the answer here.
But there's one little problem: the results do not get grouped logically within the XML. For example:
XElement xml = new XElement("States",
from s in MyStates
from cy in s.Counties
from c in cy.Cities
where s.Code == "NY"
orderby s.Code, cy...
I have a reasonably complex XML document which I want to flatten down to tables in SQL Server 2005. I don't want to have to code each field and table mapping by hand. The data is going into the staging area of a data warehouse so it doesn't really matter that much how the tables are structured.
So far I have considered, and rejected t...
How do I escape ampersands (&) in XML - I tried & but this isn't allowed.
OK The question was poor, I wanted to escape it in such a way that it was rendered as & in the web page that used the XML output. So I had to do add an additional amp; to my output.
...
Hi all,
I am trying to use a webservice to look for specific users from my PHP application. I have used that exact same webservice in ASP.NET with success.
Basically, I do everything like the PHP doc tells me to, and I use the same methods/variables I used in ASP.NET (for the webservice itself), but I can't seem to get a result.
The f...
Simple question. Does anyone know an easy way to convert SpreadsheetML (Excel 2003 XML) to the Open Document XML used for Excel 2007 (xlsx) files?
I've got a library that unfortunately doesn't read the XML format, so I need to try and find a way to read the data, that doesn't involve another library.
Any suggestions appreciated.
...
Possible Duplicate:
Why would I ever choose to store and manipulate XML in a relational database?
Although this question on the surface appears to be a rehash of what's already been previously asked, I'll state up front that it is not. My question is not how to store or retrieve XML from a relational database. The question at ha...
Hi, all.
In my previous (and first) foray into Eclipse, I inherited another Developer's workstation and setup. Now, I'm trying to setup a new Eclipse instance from scratch, and, in turn, am scratching my head.
How do I go about getting XML-style syntax coloring for files that do not end in .xml (specifically vxml files, in this case)?...
I have a piece of XML data which I need to transform into WML.
It's something like this:
<root>
<category name="music"/>
<subcategory name="classic"/>
<subcategory name="rock"/>
<subcategory name="Techno"/>
<node type="music" subtype="classic" name="beethoven"/>
<node type="music" subtype="classic" name="chopin"/>
<recor...
What is the best way to create xml file in .net 2.0 in terms of nodes etc. I dont think I could use LINQ. Any code sample or article would be helpful.
...
The only example code I have found so far is so old it won't work anymore (uses deprecated classes). All I need is something basic that demonstrates:
Loading and parsing the XML from a file
Defining the SAX event handler(s)
Reading the attributes or text values of the element passed to the event handler
...
I have a relatively general question regarding SAX. I understand how it works, and based on tutorials I've read, I've learned to keep the state by having a ton of data members like inNode that are booleans and then in each event handler, check each boolean and handle the parameters accordingly.
To me, this seems really inefficient, is ...
Hi,
I've been developing a small xml parser for a specific file with this data structure :
<questionnaire type="Echo">
<quest etat="0" ord="0">
<intro>
<t>bla bla bla</t>
</intro>
<rep1>
<t>word</t>
<ev id="Q0R1"/>
</rep1>
<rep2>
<t>word</t>
...
I need to just read the value of a single attribute inside an XML file using java. The XML would look something like this:
<behavior name="Fred" version="2.0" ....>
and I just need to read out the version. Can someone point in the direction of a resource that would show me how to do this?
...
This isn't really a question, more of an issue I ran across that I hope others can avoid.
If anyone can test in Office 2002, 2007, and 2008/Mac, that may add some important context.
Before replying, please note that Microsoft has released two XML-based formats for spreadsheets: SpreadsheetML and Office Open XML (aka "xlsx"). I've only ...