I have a simple class that essentially just holds some values. I have overridden the ToString() method to return a nice string representation.
Now, I want to create a ToXml() method, that will return something like this:
<Song>
<Artist>Bla</Artist>
<Title>Foo</Title>
</Song>
Of course, I could just use a StringBuilder here, b...
If you have something like:
val myStuff = Array(Person("joe",40), Person("mary", 35))
How do you create an XML value with that data as nodes? I know how to use { braces } in an XML expression to put a value, but this is a collection of values. Do I need to iterate explicitly or is there something better?
val myXml = <people>{ /* what...
When using XmlDocument.Load , I am finding that if the document refers to a DTD, a connection is made to the provided URI. Is there any way to prevent this from happening?
...
Hi Anyone know of a simple system of getting xml formatted inside an editor. I mainly use textpad so that would be my main interest. What I'm really asking is that when I paste an xml string from a logfile or something into textpad that I can use a plugin or a third party tool to format the xml in textpad so it is readable.
Edit: Than...
One of our providers are sometimes sending XML feeds that are tagged as UTF-8 encoded documents but includes characters that are not included in the UTF-8 charset. This causes the parser to throw an exception and stop building the DOM object when these characters are encountered:
DocumentBuilder.parse(ByteArrayInputStream bais)
throws...
I've been looking around the System.Xml namespace, but don't see anything that would support this. Does anyone know if it's built into .Net, or would I have to obtain a third party library to do it?
NOTE: I wish it were as simple as generating an xsd, but that won't do for my specific situation.
...
I have several xml files, the names of which are stored in another xml file.
I want to use xsl to produce a summary of the combination of the xml files. I remember there was a way to do this with the msxml extensions (I'm using msxml).
I know I can get the content of each file using select="document(filename)" but I'm not sure how to ...
I have an XML reader on this XML string:
<?xml version="1.0" encoding="UTF-8" ?>
<story id="1224488641nL21535800" date="20 Oct 2008" time="07:44">
<title>PRESS DIGEST - PORTUGAL - Oct 20</title>
<text>
<p> LISBON, Oct 20 (Reuters) - Following are some of the main
stories in Portuguese newspapers on Monday. Reuters has not
verified t...
I have a Java servlet which generates xml, translates it with an xslt stylesheet, and then displays the resulting HTML. This is the first time I've worked with xslt. What's a good way to debug xslt? I have (or can get) some sample XML files to apply the transform too. But I'm not really even sure of the syntax so something that would giv...
Hello, I've make an application in php that uses DOMDocument() in php 5.
The problem is that my server uses php4 and DOM object is not recognized. What can I do?
Can I download any kind of software and put it in my server and use include?
wich one?
Thanks a lot.
...
Based on what I've seen on Oslo, declarative XML will have a key role. Can I expect to be mucking around a lot of designer generated XML to create real world applications? Just know I haven't researched this. I would just appreaciate your perspective if you have examined the subject.
Some background...
Whenever I dig just under the sk...
I need to apply some xml templates to various streams of xml data (and files, on occasion) and there seem to be a large number of xml libraries for java out there -- enough that it's difficult to quickly determine which libraries are still active, how they differ from the other options that are also active, and what criteria should be co...
So what is the best way to deal with XML documents, XSD and all that stuff in C# 2.0? What classes to use etc. Like what are the best practices of parsing and making XML documents etc.
EDIT: .Net 3.5 suggestions are also welcome.
...
How can I extract information from a website (http://tv.yahoo.com/listings) and then create an XML file out of it? I want to save it so to parse later and display information using JavaScrit?
I am quite new to Perl and I have no idea about how to do it.
...
Hello,
I'm trying to do XHTML DOM parsing with JTidy, and it seems to be rather counterintuitive task. In particular, there's a method to parse HTML:
Node Tidy.parse(Reader, Writer)
And to get the <body /> of that Node, I assume, I should use
Node Node.findBody(TagTable)
Where should I get an instance of that TagTable? (Constructor...
Is there an easy way with LINQ to flatten an XML file?
I can see a number of ways with XSLT but wondered what the best option with LINQ would be?
I cant put the xml structure up exactly as stackoverflow seems to filter chevron chars. But its something like this
nodeA
--nodeA1
--nodeA2
NodeB
I want to end up with
nodeA
nod...
I appreciate that there are now many mechanisms in dotnet to deal with XML in a myriad of ways...
Suppose I have a string containing the XML....
<?xml version="1.0" encoding="utf-8" ?>
<root>
<Element1>
<Element1_1>
SomeData
</Element1_1>
</Element1>
<Element2>
Some More Data
</Eleme...
Hi All,
I'm in the process of designing a small website and was curious when an XML file can/should be substituted for a database table. There are some cases where I think using a database table may be overkill and was just wondering if anyone else has come across making this decision.
Thanks!
...
We recently upgraded to Castor 1.2 from version 0.9.5.3 and we've noticed a dramatic drop in performance when calling unmarshal on XML. We're unmarshaling to java classes that were generated by castor in both cases. For comparison, using identical XML the time for the XML unmarshal call used to take about 10-20ms and now takes about 23...
How do I make the XDocument object save an attribute value of a element with single quotes?
...