I'm going nuts trying to simply work with xml file in Visual Studio 2005. If I create a new *.xml file and add it to the project then a gray screen gets displayed instead of the file contents. This screen shows the message "This XML document is not well formed. It contains the following error: Root element is missing". It seems like th...
Hi,
I wanna change my code from:
string path=@"c:\Directory\test.xml";
XmlSerializer s = new XmlSerializer(typeof(Car));
Car car;
TextReader r=new new StreamReader(path);
car = (Car)s.Deserialize(r);
r.Close();
into Code that would convert a xml to string , and then convert string to object car.
Is it possible??
...
I'm wondering what the best way is to prevent my server from being stressed when I want to get a lot of data using PHP.
Convert all my data to an XML sheet? Use caching?
The data comes from many different databases and different tables.
Any ideas?
Thanks in advance
...
I need to consume XML based RESTful API. All request are sent in XML format. I've been using MooTools extensions to build XML requests. However, I don't know how to transform it string, so that I could send the XML directly to server.
var reqEl = new Element('req');
var loginEl = new Element('login');
var usernameEl = new Element('usern...
Hi,
I am fairly proficient in PHP, but just starting out in ASP.Net and JSP/Java
I would like to learn JSP/ASP.NET XML to HTML transformation with some simple practical examples. Im not looking to learn how to edit XML, just displaying it, but im having trouble finding definitive examples/tutorials.
Ive spent quite a while studying JS...
I have created a crosdomain policy file, I have added code to my flex app, and I still get security sandbox violation...have I done something wrong? Here are my errors and file snippets:
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://mysite.com/folder1/folder2/media/swf_demo.swf cannot load d...
I'm trying to parse my XML in C#.
Here's part of the file that is relevant:
<holder name="wnd_login" width="300" x="20" height="180">...</holder>
Here's the code that is supposed to read it:
while (reader.Read())
{
if (reader.IsStartElement())
{
switch (reader.Name)
{
case "holder":
...
I'm starting out with some XML that looks like this (simplified):
<?xml version="1.0" encoding="UTF-8"?>
<alldata>
<data name="Forsetì" />
</alldata>
</xml>
But after I've parsed it with simplexml_load_string the special character (the i) becomes: ì which is obviously pretty mangled.
Is there a way to prevent this from happening?...
Background: I'm coming from C#-land, so I'm looking for something like being able to handle nodes and values by selecting via Xpath.
Here's my code, so far:
import urllib
import sys
from xml.parsers import expat
url = 'http://SomeWebService.SomeDomain.com'
u = urllib.urlopen(url)
Parser = expat.ParserCreate()
data = u.read()
try:
...
Hi
i have an excel table with some data that i would like to export in XML.
This exported XML need to be valid, so after formatting it, it has to be validated against an XSD.
What's the best way to do it?
Obviously all the formatting and validation need to be done with Excel that is the only tool available.
This excel file will be us...
How to visualize XML from Java?
...
Simplifying, I produce a set of XML elements with a SQL query such as:
SELECT XMLELEMENT(NAME "project", project) FROM project;
<project>project1</project>
<project>project2</project>
...
Now I need to wrap this sequence into a main "projects" element, and output this in a nice indented XML file.
I've tried as follows:
db2 -x "SELEC...
Hello all
Is there any tool that takes xsl file and converting it to the same xsl:fo ?
I have html file that is converted from xsl+xsl and now I like to take the xsl and to create xsl:fo
For fop and I really don’t want to write xsl:fo now
...
I am really a newbie with streams, so I don't really know what I am doing here. :)
I have a XElement containing XML. I want it to return it as a file to the user.
XElement xml = IndicesXMLGenerator.XML();
//Code for creating a memorystream for returning to browser as file
MemoryStream stream = new MemoryStream();
XmlTextWrite...
I know a little of dom, and would like to learn about ElementTree. Python 2.6 has a somewhat older implementation of ElementTree, but still usable. However, it looks like it comes with two different classes: xml.etree.ElementTree and xml.etree.cElementTree. Would someone please be so kind to enlighten me with their differences? Thank you...
Hi foks,
my task is to convert JSON file into XML file in Perl. It is forbidden use automatic tools like XML2JSON, so I need to parse JSON in Perl variables and then, store it in XML file. Can you give me some examples how to use JSON:XS and XML:Simple to complete my task? Thanks a lot
...
Does anyone know if there's an available python library compatible with Python2.6 that exposes the Xerces functionality and its XML DOM capabilities?
I would define the desired capabilities as: XML DOM select by Xpath & XSLT processor.
...
I'm using XML Writer to create a log of some important events in my application.
Currently it all works fine assuming that the application is correctly closed, but if it isnt, the file isnt closed and the log is basically lost.
Let's assume the writing of a simple element, something like this:
writer.WriteStartElement(eventName);
wr...
Hi,
I'm trying to do some work with C# and XML in a cross-platform app (most development is in MonoDevelop on Linux, but most users will end up using the WinForms front-end that I make in Visual Studio). Mono is behaving as I'd expect, but .Net isn't and so I'm looking for options and alternatives.
The schemas have various optional ele...
I'm trying to evaluate an xml node using xpath and i'm not sure why it's not evaluating to true.
xml
<?xml version="1.0"?>
<users>
<user>
<username>tom</username>
<password>d644cd4b1c72f563855e689d46d9198e</password>
</user>
<user>
<username>jeff</username>
<password>smith</password>
</us...