class __init__:
path = "articles/"
files = os.listdir(path)
files.reverse()
def iterate(Files, Path):
def handleXml(content):
months = ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
parse = re.compile('<(.*?)>(.*?)<(...
<!-- MEMCACHE empty -->
The above is now causing issues for a script as it is now placed at the top of the XML files I'm trying to remotely access. simpleXML doesn't like the fact the XML file is no longer well formed. I tried escaping the errors but that didn't seem the do the trick. Can anyone point me in the direction on how ...
So,
I'm trying to get the content from a cell in an ODS spreadsheet.
I'm doing something like:
<xsl:value-of select="./table:table-cell[6]/text:p/text()" disable-output-escaping="yes"/>
The nasty point is that the content of my table-cell have many line breaks and my code can't get to the full text =/
I also tried many variations ...
While parsing some html files with libxml the function xmlParseFile() returns that the code includes non UTF-8 characters How can i modify the default charset of the library to ISO-8859-1 ? Is there any other way to solve this ?
PS: The entire development is based on libxml and works in most cases so I can't switch to another library.
...
I am trying to add a recurring event to my calendar via the Protocol API. I took the syntax of the recurrence tag from an event I created in Google's interface and used that in my create request. Here is what I submitted:
<?xml version='1.0' encoding='utf-8' ?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.googl...
I am having a difficult time reading an XML file with Cdata inside.
in $xmlsource
<list>
<topic>
<topicTitle>Test</topicTitle>
<topicDetail><![CDATA[<br>randomHTMLhere</br>]]></topicDetail>
</topic>
</list>
powershell
[xml]$xml = get-content $xmlsource
foreach ($topic in $xml.list) {
$topic.topicTitle
$top...
In PHP, I am trying to validate an XML document using a DTD specified by my application - not by the externally fetched XML document. The validate method in the DOMDocument class seems to only validate using the DTD specified by the XML document itself, so this will not work.
Can this be done, and how, or do I have to translate my DTD t...
I keep seeing this message in my log file:
XmlManager: ParseEntity: MessagingEngine is null
Not sure where is comes from or what it means...
I've tried to google it with no luck...
Any ideas where it is coming from?
Thanks
...
I'm trying to use xml data to insert as a variable for an animation but am fairly clueless. What am I doing wrong and how far off am I?
$(document).ready(function(){
$.ajax({
type: "GET",
url: "data.xml",
dataType: "xml",
success: function(xml) {
$(xml).find('mon').each(function(){
var top = $(t...
JAXB works well until I need to do something like serialize beans for which I cannot modify the source. If the bean doesn't have a default constructor or if it refers to objects I want to mark transient then I'm stuck writing a separate bean which I can annotate and then manually copy the information over from the other bean.
For instan...
I have several XDocuments that look like:
<Test>
<element
location=".\jnk.txt"
status="(modified)"/>
<element
location=".\jnk.xml"
status="(overload)"/>
</Test>
In C#, I create a new XDocument:
XDocument mergedXmlDocs = new XDocument(new XElement("ACResponse"));
And try to add the nodes from the other XD...
I have a element in XML:
<duration>00:08:90</duration>.
I am using XSLT to create a XML with elements required for my system.
Firstly I want my XSLT to remove the colons to look like this: 000890
Then I want to do a if-test to check whether this number is less than (<) 001000
...
The answer to this may very well be no, as much searching has turned up nothing. I thought long ago I saw something like this, but it may all have been a mirage.
Basically, it's so atrociously awful writing xslt out by hand. It's not the functional paradigm that bothers me. What bothers me is the fact that it uses XML based syntax. I wo...
UPDATE: This issue is note related to the XML, I duplicated the table using an nvarchar(MAX) instead and still same issue. I will repost a new topic.
I have a table with about a million records, the table has an XML field. The query is running extremely slow, even when selecting just an ID. Is there anything I can do to increase the spe...
I'm trying to fully validate an xml file which may be published by a user before it's fully published and live - it's basically somewhat like a sitemap.xml and it absolutely can't be published without being error-proof ( yes, I do have my own custom dtd for it as well ).
I was also thinking of implementing a storage system so it would s...
Hi all,
I'm using System.Xml to parse a xml file I generated. Some of the inner text of the nodes contains carriage return like this: " \r\n[...]\r\n ". Thant is because I used Visual Studio to format it before I parse it.
Is there any way that remove the carriage return added by formating tools?
Thanks!
Edit
@Jon: Real...
Hi,
I've an xml file of size 83,383 KB on a windows server.I load this file using MS xml parser and it works fine.
When I copy this file to another windows server, the size of file becomes 83,392 KB.When i load this file using MS xml parser, I get xml parser error message:
"Data at the root level is invalid. Line 1116371, position 8." ...
I've tried this and run in to problems a bunch of times in the past. Does anyone have a recipe for installing lxml on OS X without MacPorts or Fink that definitely works?
Preferably with complete 1-2-3 steps for downloading and building each of the dependencies.
...
So far I've only come across very bland docbook examples. I'm sure DocBook can do a LOT but does anybody have examples where styling is done and a really impressive PDF can be generated?
...
Hello everybody.
I'm referring to this old post:
http://stackoverflow.com/questions/344737/sorting-xml-nodes-based-on-datetime-attribute-c-xpath
I put my question today (it is visible in the bottom) but I'm afraid it won't be visible since the post is old... so I'm asking as new question...
I tryed a piece of code by Timothy Khouri bu...