xml

Accessing parent elements in an object model efficiently

I have a following object model: - Book -- Chapter 1 --- Page 1 ---- Image 1 ---- Image 2 ---- Text 1 --- Page 2 ... Resources are way down at the page level. But, I need to know the full path to resources, from the resources' point of view. One way, is to have resources be aware of their parents. So my Image object could have...

module to create python object representation from xml

I'm searching for an easy to handle python native module to create python object representation from xml. I found several modules via google (one of them is XMLObject) but didn't want to try out all of them. What do you think is the best way to do such things? EDIT: I missed to mention that the XML I'd like to read is not generated b...

asp.net help resource location

I have a relatively simple site that I'm working up for an intranet environment. The pages have a hook to display a simple bit of text (possibly with a bit of HTML for markup purposes) for help when the user clicks a link on the page. I'm debating whether to put the help snippets in their own XML file or create a section in web.config. T...

Is there something like <xsl:url-param name="color" />?

If I send this request to a page: http://www.server.com/show.xml?color=red&amp;number=two Can I do something like this?: I like the color <xsl:url-param name="color" /> and the number <xsl:url-param name="number" />. If you need clarification of the question, lemme know Thanks for any answers, Chrelad ...

Generate word 2003 document

I have data in XHTML and plain text in SQL Server 2005. I need to generate a Word 2003 document from this data. I was thinking of using Word XML 2003 to do this. Are there any good tools to generate Word XML 2003? ...

JAVA: Build XML document using XPath expressions

I know this isn't really what XPath is for but if I have a HashMap of XPath expressions to values how would I go about building an XML document. I've found dom-4j's DocumentHelper.makeElement(branch, xpath) except it is incapable of creating attributes or indexing. Surely a library exists that can do this? Map xMap = new HashMap(); xM...

What is an alternative to InfoPath for XML editing?

We are look at providing a method for our non-technical users to edit XML and pass it to our existing XML input functionality. I remembered InfoPath saved its data as XML, and took another look at it. It's great the way it allows you to define a form based on an XSD (XML Schema), and then allow the user to edit XML without knowing it i...

XML instance generation from XML schema (xsd)

I was wondering if there's a way I can automate the generation of XML files from XSD schemas given that I have the data and the labels. I'd like to do this in python/java. It seems very possible, yet I can't find any library that allows me to do this. I'm looking for a fairly quick solution.. Any ideas? See also: how-to-generate-samp...

Advice on the best way to structure/format a LINQ to XML query?

I have written a LINQ to XML query that does what I want, but it looks pretty ugly. I am wondering, how would you guys format the following query in a way that doesn't look quite so garish? Apologies if my example is a bit verbose. The XML documents I am querying have the following structure: <?xml version="1.0" encoding="iso-8859-1"...

Lightweight XML Viewer that can handle large files

There are plenty of "heavyweight" tools such as XmlSpy, which are good for prodding around in xml docs - but often (very often in some cases!) you just want to quickly open and browse an xml doc, and have it pretty printed. Possibly with some basic search functionality (textual is probably fine). I usually use a browser such as IE of Fi...

how to install nativeXML using Delphi 2009?

I`m using Delphi 2009 and want to operate some XML data. I heard that nativeXML is one of the most convenient ways to do it. so how can I install this library? ...

Does XQuery (or XPath) have equivalents to Update, Insert, and Delete as well as Select?

I know how to find what I need from XML using XPath. The syntax takes a little getting used to, but it is quite powerful. I'm interested in learning XQuery also, but the SQL like syntax seems awkward. Even so, if it can provide not just a select equivalent, but also update, insert, and delete as SQL does, I will forgive all awkwardnes...

SQL Server 2000, "FOR XML AUTO" Query via http, Need "Content Length = 12345" in return XML Header

SQL Server 2000 Guru's, I've setup SQL 2000 to accept HTTP Queries i.e. http://74.22.98.66/MYDATABASE?sql={CALL+sp_XMLDATA}+&amp;root=root (ficticious url) It works great and returns the following XML via I.E.7 url - <?xml version="1.0" encoding="utf-8" ?> <root> <g c="15" /> <g c="8" /> <g c="19" /> </root> However I a...

How do I stop the Sun JDK1.6 builtin StAX parser from resolving DTD entities

I'm using the StAX event based API's to modify an XML stream. The stream represents an HTML document, complete with DTD declaration. I would like to copy this DTD declaration into the output document (written using an XMLEventWriter). When I ask the factory to disregard DTD's it will not download the DTD, but remove the whole statement a...

Xml Serialization and Schemas in .net (C#)

The following questions are about XML serialization/deserialization and schema validation for a .net library of types which are to be used for data exchange. First question, if I have a custom xml namespace say "http://mydomain/mynamespace" do I have to add a [XmlRoot(Namespace = "http://mydomain/mynamespace")] to every class in my...

How to serialize in a class a Soap Fault for a website?

I hope this question is not as cryptic as the other ones I do. I have two components: Web site that recieves Soap Envelopes and Soap Faults WinServices that sends Soap Envelopes. Ok, so the winservices sends SoapEnvelopes and if an error occurs it returns the Soap Envelope with a Soap Fault Inside. Is there a way to serialize the Soa...

Why does C# XmlDocument.LoadXml(string) fail when an XML header is included?

body = "<?xml version="1.0" encoding="utf-16"?><Report> ......" XmlDocument bodyDoc = new XmlDocument(); bodyDoc.LoadXml(body); This fails with an XmlException "Data at the root level is invalid. Line 1, position 1." Any ideas? ...

What is Namespace URI Constant.NamespaceSpecNS stands for?

I'm porting parts of Java project to C# and came across this constant Constant.NamespaceSpecNS. One of its uses is in the following Java context: _xmlElement.setAttributeNS(Constants.NamespaceSpecNS,"a_qualified_name", "some_value"); where seAttributesNS is declared in org.w3c.dom Interface Element. So, from this call, I know it is ...

Using XML as (read only) human readable datasource for survey questions

Hi everyone, Scientific or market research questionnaires mainly consist of questions in the following form: INTRO: Indicate how much you agree with the following statements... OPTIONS: very much - rather - so-so - rather not - not at all ITEM 1: I love Coca-Cola ... ITEM n: ... Let's call the whole thing a SCALE. One scale consis...

C# work around for XmlSerializer.Deserialize pitfall?

I was just wondering if there are any good work-arounds for Deserializing private fields/properties using XmlSerializer.Deserialize() ? Currently, I Deserialize my XML to a simple disposable type with all public properties, then I load the complex type that has private properties like this: ComplexType complex = new ComplexType(SimpleT...