xml

Doing XML extracts with XSLT without having to read the whole DOM tree into memory?

I have a situation where I want to extract some information from some very large but regular XML files (just had to do it with a 500 Mb file), and where XSLT would be perfect. Unfortunately those XSLT implementations I am aware of (except the most expensive version of Saxon) does not support only having the necessary part of the DOM rea...

Regression testing for schema (xsd) equivalence

Hi all, I am thinking about rewriting a schema with lots of standalone complex types in it, into one where the complex types extend other base types more sensibly. The rationale for this is partly conceptual - because most of these types are specific instances of a domain object with a definite hierarchical structure - and partly pract...

Flex + DataGrid + Dynamic Display on Selection

Back again with another Flex question. I have an XML structure like... <Student> <Name>X</Name> <Age>14</Age> </Student> <Student> <Name>Y</Name> <Age>16</Age> <Address> <HNumber>1</HNumber> <HName>Something</HName> <HPin>33607</HPin> </Address> </Student> Now I got his displaying on my grid by saying dataProv...

inserting javascript in xslt not working in safari

Hi, I have a page that is pulling in an xml file uisng xslt. I need to add some javascript to it and have managed to get it all working in IE and FF but Safari is a no no. Here is the code I am using: <SCRIPT LANGUAGE="javascript" DEFER="true"> <xsl:text disable-output-escaping="yes"> <![CDATA[ javascript here ]]> </xsl:te...

Why do I have to pass an empty namespace to XPathNavigator.GetAttribute?

Given the following XML markup: <root xmlns="Demo"> <child name="foo"/> </root> and an XPathNavigator positioned on the <child> element, string withNs = navigator.GetAttribute("name", navigator.NamespaceURI); string withoutNs = navigator.GetAttribute("name", ""); produce strange results: withNs is empty, withoutNs contains foo....

Creating a WPF editor for XML file based on schema

Here's the scenario. We use a large XML configuration file for one of our server products. This file is fairly well layed out and is validated against an XSD file. It's time now though to build a configuration GUI for maintaining this file and I would like to dive into WPF to do it. I could lay out a seperate form for each config sectio...

XSL Remove a line break from text

I would like to remove the line break that follows all text that says See the Exhibit " Unwanted linebreak as shown in notepadd++: This is what I have so far: <xsl:template match="p"> <!-- output everything but the See the exhibit text should have the line break removed --> </xsl:template> Any ideas? Thanks! ...

Showing all results on success - then hide X amount

I have this page:http://www.ryancoughlin.com/files/xml/ - if you select User -> Someones name You will see a table populate. I am trying to only show JUST the results of the user you selected. Since I am actually loading an XML file I cant really send data to it. So I figured, load them all then hide EVERY entry but the one you selected...

How do you remove illegal characters from an xml file?

I am using the PHP SimpleXML way of working with XML files on my server. I only need to read the contents of the XML (I have no need to modify it) so I stuck to the simple and easy to use SimpleXML. But SimpleXML is having problems reading a certain XML file because it has some very strange characters. I get the following errors: Warnin...

PHP - Loop through files on server and run script for each file

Hello I will try to explain as well as possible what I'm trying to do. I have a folder on a server with about 100 xml files. These xml files are content pages with text and references to attachment filenames on the server that will be pushed to a wiki through an API. It's all working fine 1 XML file at a time but I want to loop throug...

WPF: copying of XmlElement

I create a window in WPF. The constructor takes a "ref XmlElement settings" which is used to display information in that window. In the constructor, I clone those settings: _ClonedSettings = (XmlElement)settings.Clone(); and I keep a pointer to the original settings: _OriginalSettings = settings; The UI modifies _ClonedSettings. Then ...

Generating XMl from DataContext

What is the modification needed in the following code to get XML from DataContext? DataClasses1DataContext dc = new DataClasses1DataContext(); var query=new XElement("Numbers", from p in dc.Pack select new { ...

C# XPath problem

When you run the following code, StatusCode is returned as null. What am I doing wrong? var xml = @"<?xml version='1.0' encoding='UTF-8'?> <kml xmlns='http://earth.google.com/kml/2.0'&gt; <Response> <name>The Name</name> <Status> <code>200</code> ...

MS Enterprise Library Data Block to pass XML into the a stored procedure with a XML parameter.

In my apps I typically use the Enterprise Library Data Block to simplify my database interactions. C# code such as: public static IDataReader AdminNavigation_Insert(int iGroupId, string sText, string sRelativeUrl, int iSortOrder) { return DatabaseFactory.CreateDatabase("database").ExecuteReader( "cms_uspAdminNavigation_Inser...

How to get parent and only one child node

Lets say I have this xml: <categories> <category text="Arts"> <category text="Design"/> <category text="Visual Arts"/> </category> <category text="Business"> <category text="Business News"/> <category text="Careers"/> <category text="Investing"/> </category> ...

XML attribute access in AS3

Hi, I have an xml file (loaded in with URLLoader) that looks like this: <?xml version="1.0" encoding="UTF-8"?> <root> <localizations> <words> <Brand us="Brand Here"></Brand> </words> </localizations> <world squareunits="100"></world> </root> Once loaded,what is the quickest way to access world.squareunits ...

Struts 2's inbuit Validations on List items

<s:iterator value="listOfValues" status="row"> <s:textfield name="listOfVoObjects[${row.index}].itemId"/> <s:textfield name="listOfVoObjects[${row.index}].itemName"/> </s:iterator> In this scenario, does anybody know how to do validations on each itemId and itemName in the listOfValues when the form is submitted using the XML v...

Why does XML::Simple flatten this Tomboy note?

I'm trying to parse a Tomboy note that has a link to another note inside it. The XML comes out looking like this: <?xml version="1.0" encoding="utf-8"?> <note version="0.3" xmlns:link="http://beatniksoftware.com/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size" xmlns="http://beatniksoftware.com/tomboy"&gt; <title>Our I...

LINQ to XML: filter a query using XElement.Attributes() collection with both XName and Value

Using LINQ to XML, XElements and XAttributes I'd like to filter a query using an exact match on an XElement's Attributes() IEnumerable collection of XName/Value pairs, against a provided IEnumerable Attributes collection of XName/Value pairs. <container> <!-- logical group of settings --> <group name="group-one"> <!-- setti...

XPath - Searching for descendent elements that a) match a filter and b) don't have a specific ancestor.

Hi, I'm trying to get an XPath expression together that will give me all the descendent elements of a node that match a filter (e.g. [contains(@class,"interesting")] but which don't have a specific ancestor e.g. [contains(@class,"frame")]. Probably best explained by example: <div class="frame"> <p class="interesting">alice...