xml

Modifying an XML File using Perl

I have an XML file, with some format. I want the data to be modified in some way I want. I feel XML::Twig is the way to do it. I want to know if there is any other better alternative? ...

Vim XMLns context awareness.

I've used Vim's g:xmldata_ to describe xml possible elements to be able to use omni-compete for xml. The problem is not each 'A' node has 'a0', 'a1', 'an'. Sometimes 'A' node has only 'a0'. And the documentation of the a0 and A is different and depends on parent of 'A'. E | |--A | \-a0 // documentation of E.A.a0 | \-a1 | \--B \...

How to create an RSS feed and display it?

On a website I am maintaining for a radio station they have a page that displays news articles. Right now the news is posted in an html page which is then read by a php page which includes all the navigation. I have been asked to make this into and RSS feed. How do I do this? I know how to make the XML file but the person who edits the n...

Are there any standards for structured email templates?

On a number of occasions I've found myself needing a way of representing an email message in a structured textual form inside my application (java applications, but that's not really relevant). Previously, I've used a hand-rolled XML format along the lines of: <email> <from>[email protected]</from> <to>[email protected]</to> ...

Working with Multiple XSD's

I have an xsd which has 3 imports to another xsd, 8 complex types and 3 simple types. Now of this I have to work on only 1 compex type, which in turn inherits many other XSD - mainly the 3 imports which current xsd's has. I will be getting XML file containing data only according to 1 complex type only, which I have mentioned. Now am...

Auto-repeat structures using simpleXML?

I am defining the elements of form in a simple XML structure like so: <subtab id="page_background" label="Page Background" prefix="page"> <input label="Background color" field="bgcolor" type="color"/> <input label="Background image" field="bgimage" type="image"/> <space /> </subtab> etc. I have large blocks containing abs...

Why do my images not load in IE but do in xx browser?

The images for my css header class load correctly in Chrome and FF, but not in IE8 or 7. Anyone know as to what I may be missing? Here is the css class code: .TBox { color:#333333; font-size:11px; background: url("../../Images/box_bottom_right.gif") no-repeat bottom right; margin: 0; padding:0; font-family:Verda...

Write to XML for creation of reporting services file, trouble with quotes

I can't figure out how to modify the C# code below, which works as it is. writer.WriteElementString("Value", "=Parameters!StartDate.Value + Parameters!EndDate.Value"); This results in the following in the XML file. <Value>=Parameters!StartDate.Value + Parameters!EndDate.Value</Value> I want to add the word "To", but I can't figu...

Creating a document from a string in Gecko

I have a string such as <html><body><div id="message">Hello World!</div></body></html> and I would like to get the content of the #message element without parsing the HTML myself. I thought maybe I could create a document object from a string in Gecko (this is for a Firefox add on) but I don't see any simple way. I noticed that ther...

How can I parse XML using Perl?

I have a file which has <Doc> <Text> .... </Text> </Doc> <Doc> <Text> </Text> </Doc> How do I extract only the <text> elements, process them and then extract the next text element efficiently? I do not know how many I have in a file? ...

Problem checking the name of a file in php

I am writing a PHP page to convert an uploaded file to XML. I only want to convert the news file to XML. The only file that ever needs to be converted is news.htm. I have narrowed my problem down to this if statement. What is wrong with it? $fileName = basename( $_FILES['uploaded']['name'] ); if( strcmp( $fileName, "news.htm") == 0 ) (...

How do you validate XML with portion of XSD ?

How do you validate XML with only a portion of XSD ? ...

Issues with links while trying to converting HTML to XML

I am trying to convert an html file to xml. It is working for the most part. The issue I am having is with links. Right now it seems to be completely ignoring the link in my test file. Here is the convert code: <?php ini_set('display_errors', 1); ini_set('log_errors', 1); ini_set('error_log', dirname(__FILE__) . '/error_log.txt'); e...

.net XML Serialization - Storing Reference instead of Object Copy

In .Net/C# Application, I have data structures which have references to each other. When I serialize them, .Net Serializes all references with separate object copies. In Following Example, I am trying to serialize to Array of 'Person' A 'Person' may have reference to another person. public class Person { public string Name; pub...

Sorting xmlnodelist with XPATH, and convert back to xmlnodelist

Hi, I have an xmlnodelist in C# I would like sort by ID without creating arrays. The XML data is loaded into a dynamic table I've created. I haven't studied a lot XPATH but I figured out by Googling the attached code could work. Howevern, I would like to get the sorted output back as an xmlnodelist in order to create the dynamic table ea...

What's the best way to pass complex data into an ASP.Net control?

I want to pass complex information into a control. The equivalent of an entire XML document. What would be the best way to accomplish something like this: <MyPrefix:MyControl runat="server"> <Actions> <Action Name="Value" SomeParam="SomeValue" AnotherParam="AnotherValue"/> <Action Name="Value"/> </Action> </MyPrefix:MyCont...

Retrieving the text parts of a xpath node() value

I've created an xpath expression as follows: /html/body/div[2]/div/ul[2]/li/a/node() It returns something like this: #01 <strong>value</strong> suffix How do I extract the "#01" part and the "suffix" part in two different xpath expressions? ...

Insert node in xml using php

Hi all, I want to insert text node and create element in xml using php for example XML <?xml version="1.0"?> <employees> <employee> <name>Albert</name> <age>34</age> <salary>$10000</salary> </employee> <employee> <name>Claud</name> <age>20</age> <salary>$2000</salary> </employee> </employees> I want ...

XML Deserialization of Inherited Objects

Hi, I have an object InputFile that has arrays and objects to hold the contents of a file. I also have ABCFile and XYZFile that are both inherited from InputFile that will read different types of file and store them into the projected members of InputFile. Since the serialization and deserialization of both of these objects are identi...

What's the point (no-pun) of XPointer ranges?

XPointer spec talks about ranges that, as far as I understand, mean you can target two nodes in an XML document and get everything in between them or something. Do people really use this? What is it useful for? ...