xml

disabling namespace attributes in serialization

Am using following code to deserialize an object, using (MemoryStream memoryStream = new MemoryStream()) { try { XmlWriterSettings writerSettings1 = new XmlWriterSettings(); writerSettings1.CloseOutput = false; writerSettings1.Encoding = System.Text...

validate xml file against xml schema

Hi, this is about validating a XML file (eg: marshalledfile.xml) against a XML schema (eg: schemafile.xsd). we are using jaxb to marshall java objects into into a xml file. what is the best way to do it ? can someone give a simple example of how to do it ? Appreciate your help. Thanks, Alo ...

Isolate a single item from XML feed with PHP

Hi and thanks for looking. I'm trying to get just the value in brackets after 1 GBP = USD from the following link, how do I do this with SimpleXML? http://www.sloomedia.com/currency/feeds/GBP.xml Thanks, Ben. ...

How do I ensure unique element values in an XML schema?

I want to ensure that there are no duplicate book titles in the following xml: <?xml version="1.0" encoding="UTF-8"?> <books xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="books3.xsd"> <book> <title>Book1</title> </book> <book> <title>Book2</title> </book> <book>...

How to align views at the bottom of the screen?

Here's my layout code; <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:text="@string/welcome" android:id="@+id/TextView" ...

Replace special string characters in jquery

HI, I have some string from XML file, and I I want to replace all "& lt;, and & gt;" ... in "< and '>" this is the AJAX call (jQuery): $.ajax({ type: "GET", url: "xml.xml", dataType: "html", success: function(xml) { alert(xml); $(xml).find('reslult').each(function(){ ...

I can't distribute JAXB closed code?

At https://jaxb.dev.java.net/ it says JAXB its under dual license consisting of the CDDL v1.0 and GPL v2; And CDDL says: Distribution Obligations 3.1. Availability of Source Code. Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Cod...

How to display posted XML data in ASP.Net

I am trying to setup a test page that will display an XML Post from a gateway but can not find any examples of how to do this. Every example I have seen has been posting information FROM a page or reading an XML FILE but nothing relating to dispalying a (I think its called) xml stream that is posted to a page? The idea is this: User sub...

jqGrid and jQuery.get()

Hi, I'm trying to populate a jqGrid from a jQuery.get() response and I'm having difficulty. I have my have table set up pretty simply and have been able to successfully call my servlet and return the xml through the following setup: $("#table_1").jqGrid({ datatype : 'xml', url : 'QueryServlet?param1=x', ... // the res...

XML serialization for Groovy classes

For an application build on Spring MVC + Groovy + Google App Engine i need simple XML serializer/marchaller. I'v tried: XStream - it doesn't work on Google App Engine, because it uses restricted (at GAE) classes Jaxb2 - it doesn't work with Groovy classes, because groovy class have additional (hidden) fields (like metaClass, etc) Xml...

Exposing web based XML data via a SQL Server view

It seems that SQL Server has a fair amount of XML support. Mostly I've seen info regarding storing XML in SQL Server, querying XML data stored in SQL Server, and exposing data as XML. Is the following scenario an option: I'd like to expose xml data (it's an RSS view of workitems) from a web site via a SQL Server view. The motivation is...

C# Linq over XML => Lambda Expression

I have an xml document which consists of a number of the following: - <LabelFieldBO> <Height>23</Height> <Width>100</Width> <Top>32</Top> <Left>128</Left> <FieldName>field4</FieldName> <Text>aoi_name</Text> <DataColumn>aoi_name</DataColumn> <FontFamily>Arial</FontFamily> <FontStyle>Regular</FontStyle> <Fon...

dtd vs xsd, which one to choose?

i want to use one of these to describe my xml document. i've read that xsd is better than the older dtd since it supports namespaces and data types. does this mean that i should only use xsd for all future needs and totally ignore dtd and don´t even have to bother learning its structure? ...

How to get a value from an xml directly (preferably using XPath)?

I am trying to get comp1's value in the most simple way in C#. I want to be able to do it with a way that requires least checkes whether an element like Primary is there, etc. i.e. // pseudo code xmlItem = root.SelectSingleNode "/Primary/Complex?Name='comp1'" So I can just check if xmlItem is null, or has no elements, instead of doi...

Castor Mapping Arrays

Hi, I've got a class that has constructor: public ContEmpirical(double xs[], double fs[]) { Check.check(xs.length == fs.length + 1 && fs.length > 0, "Empirical distribution array mismatch"); this.xs = new double[xs.length]; this.xs = xs; this.cs = new double[xs.length]; double fTotal = 0.0; for (int...

some microsoft products and XML on an interview

here's the job description: Experience with data mapping/extracts tools such as Monarch and VorteXML. Familiarity with XML documents and schemas. Minimum 1-3 years of data analysis in SQL Server environment. Working knowledge of TSQL and SQL Server 2000 tools such as Enterprise Manager, SQL Query Analyzer, Profiler, DTS and BCP. Working...

only parse a specific subtree of an XML file

I have a massive XML file. However, I'm only interested in a single small subtree of this massive tree. I want to parse this subtree, but I don't want to waste time parsing the entire massive tree when I'm going to only be using a small part of it. Ideally, I'd want to scan through the file until I find the start of this subtree, parse...

How to load PHP dynamically generated XML in FLASH

Question Updated for Bounty In Flash I need to load a dynamically generated XML file, which is created using PHP. I'm using the Bulk-loader library for all my loading. Currently my Flash can only load a manually created XML file, what I need Flash to do is to load a PHP generated XML File like this: http://dev.touchstorm.com/ten_hpn_...

Python XML need help with programming error

Hi, I am having the below code. import xml.dom.minidom def get_a_document(name): return xml.dom.minidom.parse(name) doc = get_a_document("sources.xml") sources = doc.childNodes[1] for e in sources.childNodes: if e.nodeType == e.ELEMENT_NODE and e.localName == "source": for source in e.childNodes: ...

asp.net mvc tutorial of how to http post an xml file sought

I have been trying to find some step by step guidance on how to take a user's inputs (e.g.) name address, etc) via the view, to write that to xml, and then to submit that set of data to a third party interface (e.g UK Companies house xml gateway) I have some aspects in hand (i.e. GET side of view to collect the data), but can't seem to ...