xml

Retrive and parse an XML from the web

I want to use XPath (in Java) to parse XML files. However these XML files are only available on the web (downloading them all manually is not an option (of course they have to be "downloaded" in order to be processed). So basically my question is how to do I take a URI object and convert it into a File object. Do I need to use SCP or so...

How to distribute XML schema definitions (XSD)

I am curious about what are considered best practices when it comes to distributing XML schemas. In my particular situation, I have a webservice which accepts an XML file that must conform to an XSD that I have defined. I am thinking of distributing the XSD to clients via a complimentary webservice that can be invoked at any time. Ple...

Best XML Builder that doesn't use annotations

Can you please recommend a fast XML Builder in Java that doesn't use annotations? Thanks. ...

Any reason not to use XmlSerializer?

I just learned about the XmlSerializer class in .Net. Before I had always parsed and written my XML using the standard classes. Before I dive into this, I am wondering if there are any cases where it is not the right option. EDIT: By standard classes I mean XmlDocument, XmlElement, XmlAttribute...etc. ...

In XML what do you call this: //@Dohicky.0 and how to address it in Java

It's my first time parsing XML and I don't really know what I'm doing at the moment. Here's my XML: <?xml version="1.0" encoding="UTF-8"?> <MyDocument xmi:version="2.0"> <Thingamabob name="A" hasDohicky="//@Dohicky.0"> <Dingus/> </Thingamabob> <Dohicky name="B"/> </MyDocument> So what is "//@Dohicky.0" called? I understand...

xml-fo pdf table : 'colspan' when the number of columns is dynamic

I'm generating a table in a pdf document using xml-fo. The number of columns is dynamic. Columns are only displayed when tests are passing. In tests I'm using variables like $var1, $var2, ... that point to xml nodes. I've something like <xsl:element name="fo:table-row"> <xsl:element name="fo:table-cell" use-attribute-sets="table-...

Reading XML file from Client machine - getting - Access to the path is denied

Hello there... I'm currently trying to READ XML file from the client machine where the user can open from any location (there is no specific location). However, i browse to the folder and select the xml file and when it execute this line (below) it throw an error complaining about access to the path is denied any idea how should i appro...

Bind a Silverlight Datagrid to Excel XML FIle

Hi, I am trying to pull the data from an Excel File that has been saved as XML and bind it to a Silverlight DataGrid. I am following a tutorial that I found on the web, but I cannot get the desired results. using System; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using...

How do I use column values as xml element names using for xml in SQL Server 2005?

Simplifying what I'm doing somewhat, as an example, say I have the following tables: declare @elements table (id int, name nvarchar(20)) insert into @elements (id, name) values (1, 'FirstName') insert into @elements (id, name) values (2, 'Surname') insert into @elements (id, name) values (3, 'Address') declare @values table (id int, v...

Using an XSL for-each on identical XML children

In brief, my problem is that I want to loop through the contents of one child among identical children, but when I try to do so, it loops through the contents of all the children, giving me as many duplicates of the data as there are children. Example code: Input.xml <?xml version="1.0"?> <base> <item name="item1"> <foo> ...

Mass sending data to stored procedure

Hi Gurus I'm using Microsoft .NET Framework 3.5 to create a web service with VB.NET. I'm using a Stored Procedure in SQL Server 2008 so that SQL can insert all the data that I'm passing. The problem is that in one of the servicse I need to pass around 10,000 records and it's not very efficient to run the stored procedure 10,000 times. ...

Filter XML from searchparameters

Hi there folks! I'm creating a small search function on a site I'm creating. I'm working with Umbraco CMS, and all the nodes that I need to search are children of the page that are being searched on. Right now I have a search box with seven fields. three input fields and four dropdown's. This is the XML that I need to find my results f...

How to add node to existing XML Document

I'm using stax to parse my document, here is a dummy example of my XML document : <data> <video> <title lang="eng">Harry Potter</title> <price>29.99</price> </video> <book id="1"> <title lang="eng">Learning XML</title> <price>39.95</price> </book> <book id="n"> <title lang="eng">Learning XML</title> <price>39.95</price>...

How do I remove redundant namespace in nested query when using FOR XML PATH

When using FOR XML PATH and WITH XMLNAMESPACES to declare a default namespace, I will get the namespace decleration duplicated in any top level nodes for nested queries that use FOR XML, I've stumbled across a few solutions on-line, but I'm not totally convinced... Here's an Complete Example /* drop table t1 drop table t2 */ create ta...

Why are all of my line-breaks changing from "/r/n" to "/n/" and how can I stop with from happening?

I am saving my files as xml documents, using XDocument.Save(path), and after saving and loading a document all of the line breaks have changed from "/r/n" to "/n/". Why is this happening and how can I fix it? ...

Merging Multiple KML Files

I cannot find a script to easily merge kml files; any ideas? Ideally I'd like something along the lines of kmlmerge $file $file, as I'm already working on a shell script for managing multiple kismet drone nodes. ...

How to get the Soap XML from a web service and store it in a string?

I have web service written that generates some data...can I call the web service in a way that i can store the xml soap representation of data...instead of actually calling the method that returns the actual data..i want to store the xml representation in a string ... ...

Convert XML to PSObject

Note: I'm using ConvertTo-XML and cannot use Export-Clixml: I create a simple PSObject: $a = New-Object PSObject -Property @{ Name='New' Server = $null Database = $null UserName = $null Password = $null } I then convert it into XML using ConvertTo-XML: $b = $a | Convertto-XML -NoTypeInformation The XML looks li...

php code to insert data into xml file

Hi I am trying to insert data into xml file. For Ex: <list> <activity>swimming</activity> <activity>running</activity> </list> In place of swimming i want to insert different data(ex:jogging) How can i do that? ...

Which one is erroneous? Schema file or Xml file

Here is my schema and xml file contents.When I want to validate my xml file with my schema file I got the error:Element X1 is not defined in this scope. Error line: 25 Error column: 12. Where is the problem? <xs:complexType name="LabelType"> <xs:sequence> <xs:element name="Text" type="xs:string"/> <xs:element ...