xml

Create XML document using C# with SQL Server as datasource

I need to create an xml feed from my SQL Server database I have seen it done in many different ways like: http://www.primaryobjects.com/CMS/Article67.aspx However that seems to be just wrong.. What is the best an easiest way to go about this?? I have a XSD document to work from BTW. ...

How to print pretty xml in javascript?

What's the best way to pretty-print xml in JavaScript? I obtain xml content through ajax call and before displaying this request in textarea i want to format it so it looks nice to the eye :) ...

MS CRM 4.0. FetchXML return columns even if empty

So it seems using FetchXML doesn't return a column if there is no data held for it in CRM. For example: <fetch mapping="logical" count="50"> <entity name="contact"> <attribute name="contactid" /> <attribute name="emailaddress1" /> <attribute name="firstname" /> <attribute name="jobtitle" /> <attribute name="lastname" /> <attribut...

Does the contents of rt.jar change across different JVM vendors?

Hi, I've inheirited support for a legacy web app which is directly using the **.internal.** apache xerces classes within the rt.jar. I think the history is that this code (back in java1.4) used to explicitly use xerces and at some point when moving to java5 use of the xerces jar was dropped and those classes were referenced out of rt.ja...

Empty XML element handling in Python

I'm puzzled by minidom parser handling of empty element, as shown in following code section. import xml.dom.minidom doc = xml.dom.minidom.parseString('<value></value>') print doc.firstChild.nodeValue.__repr__() # Out: None print doc.firstChild.toxml() # Out: <value/> doc = xml.dom.minidom.Document() v = doc.appendChild(doc.createEleme...

VB.Net apply XSL transformation to XML file

Hi there I have got some XML which is built by my application. This XML is dropped to an XML file, which I then wish to apply an XSL stylesheet to in order to convert it to a HTML page. However, every time, it just keeps coming out with the original XML rather than the transformed HTML Here is the XML: <firelist> <visitor> <Titl...

XML code question

In one of my XML's I have a code like this <additional_text>.+</additional_text> In the database it is stored as '.' but not '.+' Can anybody explain , Why is this happening? ...

Custom Fields with SQL Server 2008

I have several entities that I require users be able to add custom fields to. If I had an entity called customer with base variables like {Name, DateOfBirth, StoreId} and another one called Store with {Name} Then I would want it so that the owner of that store could login and add a new variable for all their customers called favourite ...

Add table to dataset

Having a problem adding a table to a dataset, watching in debugger I read xml file into datatable all looks fine, when add datatabe to dataset table/dataset ( using dataviewer ) first record looks good remaining records/fields contain a red ! mark. fs = new FileStream(Server.MapPath(GlobalVar.compathver), FileMode.Open, FileAccess.Read...

Delete node range in xml document

I need to delete a range of nodes, up to a certain number, in an xml document. What is the most efficient way of doing this? I'm currently iterating over the nodes and deleting them one at time: int trimFeeds = 20; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(MapPath("rss.xml")); XmlNodeList nodeList = xmlDoc.SelectNodes("rss...

XSLT function to validate date in the format of YYYYMMDD

I am looking for suggestions to validate an XML element which holds the date and i need a function in the XSLT to validate whether it is in YYYYMMDD format or not. ...

Most efficient way to add attribute to begining of massive XML file in Java?

What is the fastest way to add an attribute to the root element of a massive XML file? These files are too large to be read into memory and I'd like to avoid as much of an I/O penalty as possible. ...

Unmarshalling XML to existing object using JAXB

I have an xsd generated from a set of existing java classes and currently it successfully unmarshalls XML messages into the object as expected, however what I'd like the ability to do is where I have an existing instance of the Object have the unmarshaller simply update the fields that are contained within the message passed to it for e...

Retrieving XML document and parsing an HTTP header at the same time (C#).

I need to connect a piece of middleware I'm writing in C# to Adobe Connect. Their API returns all data queryied as an XML document. The issue I'm having is this: I need to check a response to see if the login attempt is successful, and if it is I need to retrieve the cookie from the HTTP headers so that I can use that cookie to perform t...

XSLT - boolean true if attribute value character length greater than 10

I attempted this to count the total characters of my title attribute value, but it didn't seem to evaluate as I intended it to: <xsl:if test="count(@title)>10"> <xsl:attribute name="class">double-line</xsl:attribute> </xsl:if> I also tried to append /text() to @title. It looks like I'm still off. Any suggestions? ...

Parse XML With jQuery

I have a XML that needs to be parsed using jQuery. I understand how to get the first level of site map nodes but some of my node are 3 or 4 levels deep. I cant seem to get past 2 level. Here is my XML and my code. I am tiring to output it to a list to be able to do a jQuery drop down on hover for one of the sites im working on. Please an...

Bind XML to editable DataGridView, allowing load and save

Hi, I have a settings dialog with a DataGridView, and an OK/Cancel button. When the dialog is opened, it is supplied an XML file that may or may not exist, and display the contents. Regardless of whether or not the file exists, the user must be able to modify the data in each cell in the DataGridView, along with being able to add or rem...

Storing settings: XML vs. SQLite?

I am currently writing an IRC client and I've been trying to figure out a good way to store the server settings. Basically a big list of networks and their servers as most IRC clients have. I had decided on using SQLite but then I wanted to make the list freely available online in XML format (and perhaps definitive), for other IRC apps ...

XSLT on SSRS report

I want to translate an XML file with data like the following: <FlatData> <Details1_Collection> <Details1 Customer1="Customer" Total1="3" /> ... </Details1_Collection> </FlatData> The data I am interested in is the attributes and their values in each Details1. The problem is that these attributes are not necess...

php open gzipped xml

Hi, I am struggling to read gzipped xml files in php. I did succeed in reading normal xml files, using XMLReader() like this: $xml = new XMLReader(); $xml->open($linkToXmlFile); However, this does not work when the xml file is gzipped. How can I unzip the file and read it with the XMLReader? ...