xml

Can a column be added to a record using XSD through SQLXMLBulkLoad?

I have a SQL Dts job pull an XML file and doing a SQLXMLBulkLoad using an XSD file. Is there a way to specify in the XSD to append a static string column to every record of a certain table? ...

RSS or XML

I need to get data from a web site written in PHP. My boss wants me to provide an RSS feed to get updated content. The problem is that I need to provide several informations (at least a dozen different field). Is returning data as XML a better way than RSS? ...

What are some useful constructs for using XSLT to produce XSLT?

I have an existing XSLT stylesheet that takes XML and produces nicely formatted XHTML. I want to make an XSL-FO version of this stylesheet to produce PDF via Apache FOP. What I want to know is this: Are there any convenient to use xslt patterns I need to learn to do things like: copying some nodes unaltered copying most of a node, b...

Including "<" characters in text nodes of XML input to an XSLT transformation

I'm using XSLT to transform an XML document to text. The text nodes of the XML document have < characters in them, which of course bombs the transformation. Is there anyway to get an XSLT transformation to work with a < character in a text node? In this case, all such characters are followed by whitespace. ...

How do I write an XSLT to transform XML to CSV?

I'm trying to write an XSLT that will transform an XML document that I have to a CSV file. Here's a sample of the XML: <?xml version="1.0" encoding="utf-8"?> <Import> <Users> <User ID="user_1" EmailAddress="[email protected]"> <Contact FirstName="John" LastName="Doe" /> <Address Street1="808 El...

Trace externally loaded XML data in Flash

How do I trace all of the data from an XML file that was loaded into a flash file? I am trying to debug, and part of my flash file gets updated from the XML file, but the other half acts like it isn't there. ...

Copying one DOM XML node to another in javascript

Hey guys, I wrote a simple function to copy contents(including all child nodes) from one node to another of an XML DOM Object. Surprisingly in the function, the for loop is not iterating for n=1 for some reason i cant figure out, please help, i've been trying to debug this in all possible ways from 4 days. FUNCTION THATS NOT ITERATING...

How do I rearrange XML nodes in PHP with SimpleXML?

I'd like to rearrange elements in the file, I do not want to use another attribute for element ordering/arrangement. ...

Visual Studio 2008 custom config xsd intellisense auto complete broken!

Hi, I used to use the intellisense feature within visual studio 2003 for editing a custom .config file against my custom xsd schema. I put the schema in: Common7\Packages\schemas\xml Everything worked happily, no problem. I have just tried to do the same in VS 2008 and there is no intellisense. The schema viewer for the .config file...

Flatten Linq to XML query result from dynamic data

In a database the data is stored dynamically. That means the metadata defines classes and attributes. The user data is stored in object and object attribute tables. To simulate how the data is represented, I created a linq query in LinqPAD: XElement test = XElement.Parse ( @"<DynaDaten> <CLS ID='99' CODE='T_PERSON' NAME='T_PERSON...

How can I uses Sesame's RDFXMLParser in JRuby?

I am not very experienced in Java and JRuby but need to parse RDF data using Sesame's RDFXMLParser in JRuby and my python-minded brain just does not want to get into it. I have problems translating the Java example into JRuby. At first I don't know how to define the RDFHandler in a way it would make sense. I also don't get why the parse ...

XmlWriter to Write to a String Instead of to a File

I have a WCF service that needs to return a string of XML. But it seems like the writer only wants to build up a file, not a string. I tried: string nextXMLstring = ""; using (XmlWriter writer = XmlWriter.Create(nextXMLstring)) This generates an error saying nextXMLstring doesnt have a file path. It wants something like: using (Xm...

Replacing Contents of HTML Tag Using PHP XML Parsing

Hello, Using PHP, what would be a simple way to use XQuery to find the first instance of a given HTML element and then replace all the HTML inside that element? So far, I've got this: $myHTML = '<strong>Some <em>HTML</em></strong>'; $domDocument = new DOMDocument('1.0'); @$domDocument->loadHTML($content); $xpd = new DOMXPath($domDocum...

XML Schema Definition Tool not generating SchemaLocation

Does the xsd.exe tool provided with Visual Studio generate the SchemaLocation attribute (in the xs:import) when generating XSDs from plain old C# objects? I am finding that my XSDs that were generated are not valid because the xs:import will import a namespace and not provide the relative schemalocation value prompting the below Imp...

Converting a SOAPMessage object to an instance of a XmlType annotated class in Java.

I'm working with SOAP using the javax.xml.soap package. I have a javax.xml.soap.SOAPMessage object that corresponds to a response to my SOAP request and I have to convert it to an instance of a class that was annotated with the javax.xml.bind.annotation.XmlType annotation. How can I do this conversion? ...

Setting Attribute value in VB.NET XML Literals

As basic as this is, it took me a few minutes to figure out, so wanted to share with the rest of the community to avoid anyone else from wasting their time. I am attempting to generate the following XML string using VB.NET XML Literals <Books> <Book Name="The First Book" /> <Book Name="The Second Book" /> </Books> I wrote the...

Dynamic GUI creation using configuration files

Is is possible to create GUI for a Delphi application using an configuration pattern from an xml etc... file. Any frameworks exist for such an operation. It is easy with scripting like languages but can we simulate this behaviour in Delphi? I need free library. ...

Xml data in String type

I am connecting to a webservice which has a service deifnition of the following format <main> <header> <data>xyz</data> </header> <test> <![CDATA[<xml><a></a><b></b></xml>]]> </test> </main> How do I use jaxb to create class file for the cdata strcture ...

How can I transform XML into a List<string> or String[]?

How can I transform the following XML into a List<string> or String[]: <Ids> <id>1</id> <id>2</id> </Ids> ...

How to print <?xml version="1.0"?> using XDocument

Is there any way to have an XDocument print the xml version when using the ToString method? Have it output something like this: <?xml version="1.0"?> <!DOCTYPE ELMResponse [ ]> <Response> <Error> ... I have the following: var xdoc = new XDocument(new XDocumentType("Response", null, null, "\n"), ... which will print this which is fine...