xml

How can I add attributes to the root node of an XML doc in javascript

Hi Everyone, I am using the sarissa javascript library to create xml on the client in a web application. My question is how can I add attributes to the root node? I am really trying to pass a small xml string to the server like basically a 1 liner of XML. I tried this and it doesn't work. oDomDoc does not support the "setAttributeNode" ...

Import 60mb XML file to SQL

I have a 60mb XML file that has a list of products, approx 8k of them. I need to get all the products from this xml file to a SQL table. The xml file has a static name so i know what to look for. I guess i want to know about the process, what makes the most sense and least overhead. How?What? is the best way to do this? When do i pa...

How to use xsd.exe /c output

I tried using xsd.exe to convert an .xsd file into a C# class. It worked, but I'm still not quite sure how to use this class. It has several class-level attributes but the most interesting is System.Xml.Serialization.XmlTypeAttribute. Which class uses that attribute? Is there a simple way to turn an instantiation of this class into a...

How to use jQuery to select XML nodes with unique text content?

Hi all - I'm attempting to pull a list of unique text entries from an XML document "the jQuery way" and am hitting a wall. From this XML: <items> <item> <categories> <cat>Category 1</cat> <cat>Category 2</cat> </categories> </item> <item> <categories> <cat>Category 2</cat> <cat>Category 3</c...

write innertext in xml file

How do i write something in the innertext of my xml file i am able to read the particualar tag from the file like this: protected void Page_Load(object sender, EventArgs e) {// this is to read from xml. if (!Page.IsPostBack) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(@"C:\configf...

Binding a WPF Listbox to Xml in Button_Click event?

Hi, I am trying to bind a ListBox to Xml in Button_Click event in xaml.cs. my Xml is simple <books> <book>ABC/book> <book>XYZ</book> </books> Here's what I am doing.. in xaml.cs XmlDocument x = new XmlDocument(); x.LoadXml(e.Result.ToString()); listbox1.ItemsSource = x; and Xaml ...

Creating a DOMDocument from a DOMNode in PHP

I get an XML string from a certain source. I create a DOMDocument object and load the XML string into it (with DOMDocument::loadXML()). Then I navigate through the XML doc using various methods (e.g. DOMXPath), until I find the node (a DOMNode, of course) that I want. This node has a bunch of descendants, and I want to take that entire...

Convert database table structure to XSD format

Hi, Is there any way i can convert a table struture in a MySQL or Oracle database to XSD (XML Schema Definition) format ?. Thank You. ...

C++ XML Schema Code Generator

We have XML files and we want to have C++ classes generated out of XML schema like we have it in .NET xsd. Also the generated classes instance needs to provide appropriate XML by calling some methods. ...

DataSet XML Relation : populate parent level instead children :S

DataSet ds = new DataSet(); ...... SqlDataAdapter da = new SqlDataAdapter(sql, conn); da.Fill(ds); da.Dispose(); XmlDataSource1.Data = ds.GetXml(); XmlDataSource1.DataBind(); I need XML Data Source from XML for making dynamic ASP:Menu This code makes DataSource as a Parent element and elements from sql as a Children I need Parent El...

XML in C++ Builder 6

How can I use XML as a simple data storage in Borland C++ Builder 6? Is there an internal class, which I could use? Thank's for help ...

Ajax issues in IE 6, 7, 8

I am having Ajax issues with IE (6, 7 & 8). I am using the Simple AJAX Code-Kit (SACK) v1.6.1 which works fine in FF, GC, Opera and Safiri. In IE it throws the error: System error: -1072896658. Breaking on JS error on line 157 (self.response = self.xmlhttp.responseText;). /* Simple AJAX Code-Kit (SACK) v1.6.1 */ /* 2005 Gregory Wild-...

Help for basic Android view for a Next/Prev navigation like E-mail setup

I am after the XML view code, just like the E-mail setup. How can I put on that bottom grey bar that Next button, how about a Prev button on left side? ...

PHP / cURL problem opening remote file

We have a script which pulls some XML from a remote server. If this script is running on any server other than production, it works. Upload it to production however, and it fails. It is using cURL for the request but it doesn't matter how we do it - fopen, file_get_contents, sockets - it just times out. This also happens if I use a Pyth...

PHP DOM XML - Create Multiple NameSpace Addtributes?

Guys, I'm working on some PHP to create XML from a database using the DOM extension. Basically, I need to create a NameSpace and add 3 attributes to it: <NameSpaceName xmlns="http://xxx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xxx"&gt; The full code i've written is below: include_onc...

Buttons to fill width when using TableLayout

Hello, <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <TableLayout android:id="@+id/TableLayout01" android:layout_height="wrap_content" android:layout_width="fill_parent"> <Tab...

Solution for semantic control of xml document

For example, Xml document: <some_document> <elements> <element>1</element> <element>2</element> <element>3</element> </elements> <sum>6</sum> <some_document> Rules(in some form, probably in xml), according to schema of given document: Sum of all <element> fields must match the value in <sum> field Result: Is document vali...

How can I return a specific node when there are different selection criteria/depths with xpath?

Given the following XML, <root> <property> <programs> <program>1</program> <program>5</program> </programs> <tool> </tool> </property> <property> <tool> <programs> <program>1</program> <program>2</program> ...

Forms-application to display, edit and save XML. What are the possibilities?

Hi all, I have to develop a forms-application with the following specs. I have an XML file with data. I have to display this data within my application or by forms. The user must be able to view, edit, add, manipulate the data and save it to an XML file. I can't use an application/web server, it must be an offline application and the d...

How do I set the selected state of an image button with xml

I have an image button as defined below. <ImageButton android:text="Play" android:src="@drawable/playpause" android:background="@drawable/opaque" android:gravity="center_horizontal" android:id="@+id/player_ctrl_btn" android:layout_width="fill_parent" android:padding="0px" android:layout_height="wrap_...