xml

How do I create an XML template in Perl?

The XML file I need to create is like <file> <state>$state</state> <timestamp>$time</timestamp> <location>$location</location> .... </file> I don't want to use several print to create the needed XML file, what I'm expecting is to have a template, which defines both the structure and format of the XML. Then w...

XmlMassUpdate - how NOT to add xmlns ?

I'm using Nightly build 1.3.0.477 of MSBuild Community Tasks and I'm having problem with XmlMassUpdate. Here's what I want to do: for each project, if it does not reference CommonAssemblyInfo.cs file, add that reference. I'm doing it like this: <Message Text="Path is $(MSBuildCommunityTasksPath)" Importance="normal" /> <!---->...

Doctype for xml standards-compliant mode in IE

I have been searching for a while for a DOCTYPE tag that will make internet explorer standards-compliant for css with a normal xml document, as I want to use the white-space css attribute. This page states that using the "doctype 'XML'" should be enough for internet explorer 6+ to come through - But I have tried every DOCTYPE tag I could...

Proper XML formatting

Possible Duplicate: Should I use Elements or Attributes in XML? I'm writing a configuration file in XML and I am pretty much new to the whole XML craze. I'm curious what the SO community thinks about how various values should be represented in XML, as I can see a couple of ways to do it. For example, when should a value be an ...

xsd same element, different types?

Hello! I have a situation where an element in the XML-file can be of two different types in the XSD. What I want to do is first to validate the entered value to the more strict type (if it's a person that fills out the form) and if that doesn't pull through, validate it to the lesser strict type (if it's an organization that fills out ...

Generate XML with namespace URI in PHP

Ho to make this "simple" xml with php using DOM? Full code will be welcomed. <rss version="2.0" xmlns:wp="http://url.com" xmlns:dc="http://url2.com" > <channel> <items> <sometags></sometags> <wp:status></wp:status> </items> </channel> </rss> i'm so lost. Code will help me more than any explanation. ...

xml to xsd conversion problem

Hi, I have an XML i want to validate in java. The only problem i have left is trying to write the XSD for an attribute which is actually a reference to a namespace. It's not possible to use the "<xs:attribute name="xmlns"/>" because xmlns is not allowed as the name of an attribute. Any ideas? XML: <header> <abc xmlns="www.exam...

How to edit a SQL Server XML data field with asp.net Dynamic Data

I have a site based around asp.net 3.5's Dynamic Data feature. Everything's working great, but I would like to add a tagging feature via a column with an XML data type. I've made the column and added an appropriate schema, but it is showing up as read-only and the scaffold will not display or modify the field. So, I have a few question...

Creating XML Document from XSL Schema

Hi, Does anyone know a better way of creating XML Document from XML Schema? ...

How to access element like <game:title> with simplexml?

Hello! I'm trying to parse XML feed with SimpleXML, here is a chunk of the XML tree: <item> <game:name>Tetris</game:name> <game:desc>Way Cool Game</game:desc> <size>5mb</size> </item> Well actually, I can succesfully access 'size' with something like that: $item->size, but how do I get value? Of course I can't call like that: $ite...

Reading iTunes XML File With PHP

I'm trying to read the iTunes XML file with PHP. I want to extract particular bits of information. Such as the Name, Artist and Album. How would I do this? I found this which works quite well when parsing the whole file. I thought perhaps using this to create a whole new XML file which is easier to read. But there must be a better way. ...

explicit and implicit XML name spaces

My question is how to set values to two attributes that have the same name but different namespaces. Using C#, in an XML document, I need to assign two attributes to an element. It should look like doc xmlns:xmi="uriaddress" element xsi:type="xsitype1" type="type1" I tried xElement.SetAttribute("type","uriaddress","xsitype1") this w...

Using variables in XmlSlurper's GPath

Is there a way to have XmlSlurper get arbitrary elements through a variable? e.g. so I can do something like input file: <file> <record name="some record" /> <record name="some other record" /> </file> def xml = new XmlSlurper().parse(inputFile) String foo = "record" return xml.{foo}.size() I've tried using {} and ${} and () ...

Actionscript and xml - a Guru should make mince meat of this question :-)

Hi there, I were hoping that someone can help me with this Actionscript (2) I want to load an image into my flash file, and then assign a image from a folder using the xml file - and then make it link to the url in the xml xmlData = new XML(); xmlData.ignoreWhite = true; xmlData.onLoad = function(loaded) { if (loaded) { loadMovie(...

oracle xml parsing gives invalid character error

Hi, I am using Oracle 11G sql developer's Export Utility to convert the tabular data into XML. To do so, I have used utf-8 encoding. The special characters (0x13) which i see in DB as square boxes, have come into xml as it is. To get rid of this special character, do we need to select some other encoding in Sql Developer? The problem I...

Writing data as XML in an app

What's a good way to archive the data from a class into XML and write it out to a file? (in Objective-C for iPhone SDK) I see lots about using NSXMLParser to parse the data but not much on creating the files. ...

xsd:boolean element type accept "true" but not "True". How can I make it accept it?

I am using xmllint --schema option to validate my XML that looks like this <XML> <Active>True</Active> </XML> In my schema file, I have following line that describes Active element. <xsd:element name="Active" type="xsd:boolean" /> When I run xmllint, I get error messages that says /tmp/schema_validation.xml:73: element Activ...

YAML compared to XML

I read that after years yaml will be used instead of xml. Please compare the relative advantages and disadvantages of each specification. ...

How to avoid parameter with all within ?

Hallo, first of all, i am not very familiar when it comes to xml and similiar, so please dont punish me with my beginner question :D I have a xml file looking like this : <?xml version="1.0" encoding="utf-8" ?> <mainstuff> <category_major> <project_name>Dream</project_name> <project_attribute>Version 1.0</project_attribut...

Can I store HTML as XML in a Sqlite3 database?

Is it possible to do this? The HTML files in question all conform to: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; EDIT: How would you store a number of HTML pages with sequential IDs associated with them in a database? (Oh, I'm new to databases). EDIT: N...