xml

Python - merging many url's and parsing them

Hi, Below is script that I found on forum, and it is almost exactly what I need except I need to read like 30 different url's and print them all together.I have tried few options but script just breaks. How can I merge all 30's urls, parse, and than print them out. If you can help me I would be very greatful, ty. import sys import str...

How to test than an XML string is well formed in .net

I'm looking for some code in .net to allow me to test an xml file to determine if it is well-formed. I am not validating the file against a schema at this point in my code, just testing that it conforms to xml specification for being well formed. Any assistance is appreciated. ...

Output HTML in XML Attribute

Hi Everyone: I am attempting to display HTML information in an attribute of a XML document. For example, I somehow want to accomplish the following: Attributes: id = "id" HTML_Elements = { <a href="./link.html">link</a> } (<something id='id' HTML_Elements='code'></something>) I am wondering if there is some way to accomplish d...

How To Store Arbitrarily Wide Tree Of Set Depth

Hello Everyone. I need to store data that looks like this: <root> <child-one> value 1 value 2 ... value n </child-one> ... </root> By this I mean, a very shallow tree with a variable number of leaves. I would have liked to store this data in a relational database, but I cannot find of w...

Generate XML file from database by XSD schema

I have database tables (SQL Server 2005/2008) and XSD schema which describes XML document. How can I generate XML document from database tables by this xsd schema? Thanks ...

Deserializing xml to object with dictionary

This is my class structure: class DataItem { public string Id { get; set; } public string Type { get; set; } private Dictionary<string, DataProperty> properties = new Dictionary<string, DataProperty>(); public Dictionary<string, DataProperty> Properties { get { return properties; } set { properties = value...

What does my XSLT need to do when the XML has a xmlns in it?

For the following XML <Properties ComponentID="1272040480745" Admin="true"> <Datum ID="P01" Type="File" Name="CSS To Use">style.css</Datum> <Data> <External></External> <Result> <results xmlns="http://www.interwoven.com/schema/iwrr" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.inte...

Parsing broken RSS feeds with Perl

I would like to be able to parse RSS and Atom feeds that contain non-valid XML. The errors I have encountered and would like to fix include "simple" things such as a &gt where the closing ; is missing, missing closing tags and closing tags that appear in the wrong order. I would like to ignore the question whether in theory it makes any...

XML Schema Validation: Identity Constraint Key?

I've been trying to build a pepXML to mzIdentML converter and using this validator to make sure my implementation is correct. Currently, I keep getting this error: "Validation error in file './files/test-test.mzid' line 24231 column 13: identity constraint key for element 'mzIdentML' not found" I can't figure out what this error eve...

best way to convert the this html file into an xml file using python

this html is here : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body> <div bgcolor="#48486c"> <table width="720" border="0" cellspacing="0" cellpadding="0" align="center" background="http://title.jpg" height="130"> ...

Does XSD support validating the contents of an XML element?

I'm currently trying to create an XSD where I have a which can have only on of the following values: <media_type>wmv</media-type> or <media_type>h264</media_type> or <media_type>mov</media_type> I have found the <xs:choice/> element, but if I construct a complex type as such: <xs:element name="media_type" type="xs:string"> ...

better Android XML Layout Editor than the one in Eclipse

Hello, I'm searching for a better Android XML layout editor than the one in eclipse. Preferable placing items by drag and drop to the correct X/Y position. With the current editor I have to try out figures to place it at the exact position ... is there an easier way ? (RelativeLayout is used) ...

Ajax XML response containing html tags

I am using ajax to update the content in a textarea and display the content as html. The textarea contains multiple lines. After the backend puts the content to the database, it returns the content in XML. Since I want to display the content as html, I use nl2br() to replace spaces with . But the problem is doesn't quite work with XML b...

Understanding REST Entities (variations based on request and responses)

OK so I have a few operations for my REST Web Service. There is some overlap of entities between the different operations but based on what I'm doing some of the elements/attributes are not relevant. Eg. When I request rates I need to get back: <Property id=””> <Rooms> <Room> <Rates> <Rate></Rate> </Rates> ...

Help needed in XML Serialization.

I am trying a write a program to serialize a object to a xml file. [XmlRoot ("Person")] public class person { [XmlElement("Name")] public string name { get; set; } [XmlElement("Age")] public int age { get; set; } [XmlElement ("Location")] location _location = new location { city...

Xquery parsing text with <a> tags

I am using XQuery to extract content from html pages. The html body structure is of this kind: <td> <a href ="hw1">xyz </a> Hello world 1 <a href="hw2">Helloworld 2</a> Helloworld 3 </td> My XQuery expression for extracting the text is as follows: //a[starts-with(@href,'hw1')]/following...

FreeMarker Template JSON - Give it a node?nextSibling to find out, if the current node have a sibling?

I want to convert a XML File to JSON. The problem is, I have the structure Content ... Secon ... Secon ... Secon ... I want it to the JSON Format like: { "nodeid" : "34", "text" : "First level", "children" : [{ "nodeid" : "1", "text" : "Content ...", "leaf" : true ,"children" : [{ "nodeid" :...

Exclude attribute from a specific xml element using xslt

I am new in xslt. I have the following problem. I need within an xml, to remove a specific attribute from a specific element. i.e. <html> <head>...</head> <body> <div id="qaz" theAtribute="44"> <div> <div id ="ddd" theAtribute="4"> <div id= "ggg" theAtribute="9"> <div> <div> </b...

BizTalk BAM - manually editing BTT XPath to return just the First instance of a Message Payload property?

Hi! We have a preference for using TPE for BAM tracking since it can be deployed independently of our orchestrations. However, at one point in our process, we need to track a message payload property which has a 1:N relationship with the Root XML Element of the message. Despite the 1:N relationship, extracting just the first value of ...

Renaming xml tags of dictionary items generated by DataContractSerializer

When object with dictionary serialized into xml file, the dictionary items tags get strange prefix. [DataContractAttribute()] public class TestClass { private Dictionary<string, SomeThing> _attributes = new Dictionary<string, SomeThing>(); [DataMember()] public Dictionary<string, SomeThing> At...