xml

Vim - Deleting XML Comments

How do I delete comments in XML? If the opening and the closing comment tags are on the same line, I use :g/^<!--.*-->$/d to delete the comment. How to delete the comments that are spread across many lines? ...

Creating XSD schema for messages validation Problem

I 'am developing an interface between my system and other system based on XML messages that will be sent over the internet (by web services). I've created an XSD schema files to define the message structure. I 'am using Microsoft Biztalk to create the sachems and new in this field. I've build an validation process for the incoming and ...

Incrementing an element using LINQ to XML

Using VB.NET (3.5), i have an ArrayList of Employees. I'm trying to build an XML representation (to feed another system) and one of the fields is a simple incrementing ID, starting at 1. The code I currently have is: Dim Emps = <Employees> <%= From ee As Employee In Employees _ Select <Employe...

SPField custom attributes in schema

I'm trying to decide whether it is possible to store custom attributes in a SPField's schema XML. If you look at the .xsd for the 'Field' element in SharePoint, there are a slew of attributes. The last one in the attribute list is <xs:anyAttribute>. This elements purpose is to allow it be extended. This obviously leads me to believe it...

Mangling IDs and References to IDs in XML

I'm trying to compose xml elements into each other, and the problem I am having is when there's the same IDs. Basically what I need to do is mangle all the IDs in an xml file, as well as the references to them. (I'm doing this with SVGs to add a little context) Say I have: <bar id="foo"/> <baz ref="url(#foo)"/> <bar id="abc"/> <baz re...

Getting an object representation of an .XSD file in Java

What is the easiest way to obtain a statically typed representation of an XML schema (.XSD) in Java? More specifically I want to be able to programatically traverse all defined simpleType:s and complexType:s in the XSD, obtain defined elements and their types, etc. Something along the lines of: for (XsdComplexType complexType : docume...

Traverse an XML Document in a SQL Server 2008 Database Column

I have a table that contains a column that is XML data type. I am looking to put a view over the entire table including the XML data type column. The view will expand contents of the XML data type column. I am having a problem being able to traverse the entire XML document and pick up values from particular XML nodes. I am using this...

Is it bad practice to use string literals in xpath expressions?

I currently use string literals in my xpath expressions. For example: paragraphList = root.SelectNodes("paragraph"); I know you should generally avoid using literal values, but I figure this is safe, since the names of your xml nodes will rarely change. Is this bad practice, or am I same? ...

XStream : node with attributes and text node?

Hi, I would like to serialize an object to an XML of this form with XStream. <node att="value">text</node> The value of the node (text) is a field on the serialized object, as well as the att attribute. Is this possible without writing a converter for this object? Thanks! ...

XML parsing with java dom parser converts xml declaration into elements

Here is the xml file that I need to process as part of my assignment. <?xml-stylesheet type="text/xsl" href="people.xsl"?> <People> <Person> `...` </Person> `...` </People> I am using the "javax.xml.parsers.DocumentBuilderFactory" to create a dom parser. After parsing, the resultant document does not have People at t...

XDOM API in UniVerse

Hi all, I am building an xml parser and constructor using the XDOM functions in UniVerse 10.1.0. Things are going fine until I get to use the XDOMAddChild function. I can add single elements fine using the handles but I get an error when adding a tree. The manuals indicate adding a tree is fine. XDOMAddChild function Syntax XDOMAddCh...

Howto prevent XPath from return all if empty compare-variable?

Hello, i have this construct to questionate my xml-document with a binding in xaml. XPath="/doc/B/lists/entry[@value=(/doc/A/selectedValue)]" If the path /doc/A/selectedValue is empty or did not exist all nodes of /doc/B/list/entry are returned. Is there a way to define that nothing should be returned in the case that /doc/A/selected...

XSLT output to HTML

Hi, In my XSLT file, I have the following: <input type="button" value= <xsl:value-of select="name">> It's an error as it violates XML rule. What I actually want is having a value from an XML file assigned to 'value' parameter in the HTML output. How do I do this? Thanks ...

XHTML validation in visual c++ projects

Hi Is it possible to automatically validate XHTML (html files) files in a visual 2008 c++ project, so that errors of the validation are displayed in the output pane when the project is build? ...

NullReference at XML-Operations

I'm getting a NullReferenceException upon trying to read an attribute of an xml-file - what attribute to read from what element is defined by user-input. The StackTrace keeps redirecting me to this line (marked) XmlDocument _XmlDoc = new XmlDocument(); _XmlDoc.Load(_WorkingDir + "Session.xml"); XmlElement _XmlRoot = _XmlDoc.DocumentEle...

GData Error: Intermittent "Invalid root element"

I'm sending GData queries to renders traffic charts for users of Instructables.com using the Java GData package. However, this exception is sometimes thrown: [Line 1, Column 0] Invalid root element, expected (namespace uri:local name) of (http://www.w3.org/2005 Atom:feed), found (:feed The only mention of this error I can find online ...

When should a DTD be made public

When creating a custom external DTD you have the choice of making it private or public. When should a DTD be made public? In this case I'm creating a DTD for an xml file which will describe product. The XML will be created by our client, filled with data from their old system. we will import this data into the new system we are building...

Using CDATA element in XML is vulnerable or not?

Is it a vulnerable using CDATA element in XML documents? If so what happens if we use CDATA element in XML documents? ...

AJAX won't POST to URL

Hi! Im trying to build a simple AJAX script that uses a form to send parameters to the Tumblr API. This is the current code: <body> <script type="text/javascript"> function ajaxFunction() { var email = document.getElementById("email").value; var password = document.getElementById("password").value; var title = document.getElementById(...

PHP SimpleXML XPath contains() to find other elements referenced by this element

Hi Guys ang Gals, I'm being given XML in the following format, and am parsing it with PHP's SimpleXML. <?xml version="1.0" encoding="UTF-8"?> <ManageMyBooking> <BookingInfo> <PartyDetails> <Passenger> <PaxNo>1</PaxNo> <Title>Mrs</Title> <Surname>Murphy</Surname> ...