xml

Equivalent of Beautiful Soup's renderContents() method in lxml?

Is there an equivalent of Beautiful Soup's tag.renderContents() method in lxml? I've tried using element.text, but that doesn't render child tags, as well as ''.join(etree.tostring(child) for child in element), but that doesn't render child text. The closest I've been able to find is etree.tostring(element), but that renders the opening...

Using JavaScript and XML in an HTA?

JavaScript is the web language I am most comfortable with, and I am new to HTA but I think it might be 'the' way to make a fully local dynamic page (updatable with imgs, forms, and the ability to save/load at runtime) using xml as a data source. I just can't find any info on doing so. Also if you could quickly... can I use image maps in ...

Online XML Viewer

I have a webserver with XML files on it. I want to find an online application that I can put on that server that will give Users access to view the raw XML files without being able to edit them. Does anybody have any ideas? This is a Windows server. ...

Book to know more about XML Web Services in ASP.NET

Hi all, I am involved in a project with UI comprising mainly of Action Script. My role as an ASP.NET programmer is to pull data from DB using Web Services and supply it as XML to the Action Script. It would help me immensely if I could learn more about XML Web Services in ASP.NET. I searched for a new book in this topic but couldn't fi...

Displaying data in XML

I'm writing an xml file. The file must contain the &q inside it and &y and &id. The problem is that when I'm opening the XML Viewer in Windows, it is giving me an error that semicolon is expected. Is there any solution to this problem??? The element is: <cs-uri-query> course=323-21-603&q=3&y=2002&id=671 </cs-uri-query> ...

XML to XML translation in Java

I need to translate from XMI to OWL (XML/RDF serialized) in Java, so essentially this is XML to XML translation and most probably I could just play with regex and use replaceAll to what I need, but that seems very messy way to do it. What would you suggest so that it will be easily customizable later (my OWL model might change slightly i...

Accessing root node of XML in Flex

I'm having trouble accessing the value of the root node of an XML variable in flex. For example: var X:XML= <Message Type="abc"> Content123 </Message> I can change the "Type" attribute above with X.@Type="xyz"; But how do I change "Content123" to something else? If the xml document were longer/deeper, I could say something ...

How to fix unclosed-tag XML in java

I'm parsing XML in java using StaX, but my XML is not well-formed so the parser will throw error. In XML, there are unclosed-tags for example : <person> <name>John</name> <age>21 ... ... </person> the <age> tag doesn't has closed tag </age>. So I need to fix the XML first.. how can I fix the XML to close the unclosed-tag? ...

xml data in actionscript 3.0?

is the target.data, a default structure of whole xml? in as3, should the data of xml loaded through this data itself? function xmlDisplay(e:Event):void { xmlData = new XML(e.target.data); trace(xmlData); } ...

How do I handle unicode user input in Scala safely (esp XML entities)

On my website I have a form that takes in some textual user input. All works fine for "normal" characters. However when unicode characters are input... well, the plot thickens. User inputs something like やっぱ死にかけてる This comes in to the server as text containing XML entity refs &#12420;&#12387;&#12401;&#27515;&#12395;&#12363;&#12369;&...

How to extract Twitter username from Search API via PHP

The Twitter Search api returns results in ATOM/XML format which look like this: <author> <name>username (Friendly Name)</name> <uri>http://twitter.com/username&lt;/uri&gt; </author> In my PHP I can get the name field as a variable, so it would look like this: $names = "username (Friendly Name)" But I want to use PHP to extract ...

returning multiple values using clojure xml zipper

Lets suppose we have some XML like so: <a> <b> <c>text</c> <d> <e>text</e> <f> ... lots of cruft here .. </f> </d> </b> <b> ... </b> <!-- more b sub-trees --> </a> Now, looking through the samples in zip_filter/xml.clj, I've figured out how to get to single values that I'm intereste...

How can I validate XML with XSD in Perl?

This may be a simple question for most Perl programmers, I have only used Perl for two weeks so far and am very unfamiliar with the Perl packages. I have a simple XSD file as below: <?xml version="1.0" ?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema"> <xsd:element nam...

create xml from sharepoint query?

Hi, I am querying a sharepoint list like <where><Field Ref Name='Title'/><Value type='Text'>A</value></where> now I am creating a webpart where I want to create xml based on this query.I don't know how to achieve this mainly I want sth like content query webpart like getting xml from querying a list and then apply xsl on it. Can anyo...

as3: Loading XML into a my class' property doesn't seem to do what I would expect...

This seems like it should be an easy one but I can't figure it out. I'm trying out a very simple class that, when created, loads and XML file into the class's property. I must be getting a basic concept tangled up here because I can see the XML coming in just fine in the handleComplete function, but the class property _result remains em...

AS3: Inserting XML Elements Alphabetically By A Property

So I'm having a slightly tricky issue... I'm generating an XML file within a class I'm writing. Let's say this was the starting XML: <base> <container id="0"> <element type="Image" x="0" y"0" /> <element type="Image" x="100" y"0" /> <container/> </base> I want to add additional <element>'s. The first order of...

Get xml attribute values as string[]

My xml file has something like this: ... <Keyword name = "if" /> <Keyword name = "else" /> <Keyword name = "is" /> ... So how can I recursively get all of the values of the name attribute and add them to a List<string> or string[]. Maybe a foreach loop? I followed codemeit's and I keep getting an error:Data at the root level is invali...

html:title in pure XML document

I decided to use pure XML+CSS instead of (X)HTML for my webpage. I use and with no problems. However I can't specify webpage's title. Document looks like this: <?xml version="1.0" ?> <?xml-stylesheet type="text/css" href="style.css"?> <html:html xmlns:html="http://www.w3.org/1999/xhtml"&gt; <html:head> <html:title>FooBar</html:title...

In XSLT is it possible to use the value of an xpath expression in a call to a template using an param

I am performing an xsl transform and in it I call a template with a param using the following code <xsl:call-template name="GenerateColumns"> <xsl:with-param name="curRow" select="$curRow"/> <xsl:with-param name="curCol" select="$curCol + 1"/> </xsl:call-template> This calls a template function which outputs part of a table ...

PHP seems to break my RSS page, help?

I have a xml declaration in top of my page like this echo "<?xml version="1.0" encoding="ISO-8859-1" ?><rss version="2.0">"; and ?> in the echo seems like php thinks it's a closing statement or something. Am I missing something or is there some other workaround this? By the way the page is a view in my codeigniter project, if th...