I'm building a simple web base rss reader in python, but I'm having trouble parsing the xml. I started out by trying some stuff in the python command line.
>>> from xml.dom import minidom
>>> import urllib2
>>> url ='http://www.digg.com/rss/index.xml'
>>> xmldoc = minidom.parse(urllib2.urlopen(url))
>>> channelnode = xmldoc.getElements...
Spring has a very handy convenience class called PropertyPlaceholderConfigurer, which takes a standard .properties file and injects values from it into your bean.xml config.
Does anyone know of a class which does exactly the same thing, and integrates with Spring in the same way, but accepts XML files for the config. Specifically, I'm t...
I am in a situation where my application has to read an XML file that another application will drop onto a specific location on the file system (on multiple platforms). I control the contents of this document. The other application is simply providing transport.
I'd like to ensure that the document hasn't been modified in transit or f...
I'm trying to determine whether an XML element exists with Groovy's XmlSlurper. Is there a way to do this? For example:
<foo>
<bar/>
</foo>
How do I check whether the bar element exists?
...
I am making a CSS file for an XML document. I need to insert an image - the filename of which is contained inside an element.
This is part of the xml code I am referring to:
<description>
<text> Club Praia is divided and linked by a foot bridge over the main street which runs
through the heart of Praia Da Rocha.</text>
<image...
C# XML Reading hanging out
Hi Friends,I have a 100 MB XML File.Got suggestions from linked in that In C# XMLReader is the best for reading XML File..But when i use that reader for reading of size 100 MB XML File,its reading but some times hanging...could any body help how to proceed with XML reader with out stucking..?
...
I am looking for at tool for semi automatic XSLT generation.
Given 2 XLM files, source:
<elm>XXX</elm>
and target:
<exx>XXX</exx>
The tool should make the XSLT file, which produces the target from the source.
Looking at the content, it should identify changes in level, placement, element names etc.
There is no general solution to ...
Hi
Does anyone know what advantages (memory/speed) there are by using a class generated by the XSD tool to explore a deserialized XML file as opposed to XPATH?
...
I am using WCF to return a plain old XML (POX) document to the caller. I am using the XML Serializer formatter to turn the objects into XML.
In the returned document I have some extraneous xml namespace references (that weren't there in the ASMX version) for the XML Schema and instance. I have seen various arguments on the web that ...
It is easy to read an XML file and get the exact Node Text, but how do I Update that Node with a new value?
To read:
public static String GetSettings(SettingsType type, SectionType section)
{
XmlTextReader reader = new XmlTextReader(HttpContext.Current.Request.MapPath(APPSETTINGSPATH));
XmlDocument document = new XmlDocument();...
Given a source XML document and a sample of what it should look like after it is transformed, is there a code generator that could create an XSL transform to accomplish that.
I am not expecting it to be perfect but, much like the code generators that can create XSD from sample XML, it would be a good starting point to then refine by han...
Do people have any recommendations on how i could write my own custom JAXB annotation handling class to support the generation of xs:annotation/xs:documentation elements in the xsd schema?. I'd like to create a new java annotation "@XmlAnnotation" which would include a "documentation" attribute. I'd then make these classes available to t...
Problem. We log things to a database. To keep disk space usage capped we export from the database to files that can be copied off, or just plane deleted. Some power above me wants to see this as JSON.
I see a single JSON files as a single object. So in this case we'd create an object with a list of log messages. Problem is, this fil...
Is it possible to open 2 documents from an xQuery and do a join on them?
...
Hi there!
I am parsing a XML file in Java using the W3C DOM.
I am stuck at a specific problem, I can't figure out how to get the whole inner XML of a node.
The node looks like that:
<td><b>this</b> is a <b>test</b></td>
What function do I have to use to get that:
"<b>this</b> is a <b>test</b>"
...
I'm working on a WCF service that will be communicating over net.tcp to n instances of a client app (that is being developed by another programmer in my office).
At the moment I am using net.tcp without any security as I felt setting this up at this stage wasn't necessary, at least not until we are closer to rolling out.
During the de...
HI..........
i have to generate a xml file dynamically at runtime........So plz help me.
<?xml version="1.0" encoding="UTF-8"?>
2. <xml>
3. <track>
4. <path>song1.mp3</path>
5. <title>Track 1 - Track Title</title>
6. </track>
7. <track>
8. <path>song2.mp3</path>
9. <...
I have noticed two different approaches to writing out data to an XML file (error handling omitted for brevity).
The first method has you build the XML document and then simply save the XML to a file:
using (XmlWriter writer = XmlWriter.Create(fileName))
{
writer.WriteStartDocument(true);
writer.WriteStartElement("parentelement...
I have a web service that has an input object similar to the following.
public class MyInput
{
[System.Xml.Serialization.XmlArrayItem("Demographic")]
public DemographicsInfo[] Demographics {get; set;}
}
With the definition of the DemographicsInfo class like this.
public class DemographicsInfo
{
[System.Xml.Serialization.X...
When I realized I needed to create an index for approximately 50 XHTML pages, which may be added/deleted/renamed/moved in the future, I thought "No problem -- I'll write a quick index generator using LINQ to XML, since XHTML definitely counts as XML".
Of course, as soon as I tried running it, I found out about the fact that XLINQ choke...