xml

Not adding a namespace when using xml.setNamespace()

Whenever I call xml.setNamespace(ns), the namespace of the element is set to ns, but ns is also added as another namespace with it's own prefix to the element. I would like to know how to stop the latter from happening (I'm okay with modifying XML.prototype.function::setNamespace) without defining @xmlns as I can't use E4X syntax. Altern...

Disabled/Custom params_parser per action

Hi, I have a create action that handles XML requests. Rather than using the built in params hash, I use Nokogiri to validate the XML against an XML schema. If this validation passes, the raw XML is stored for later processing. As far as I understand, the XML is parsed twice: First the Rails creates the params hash, then the Nokogiri pa...

C# -merge XML files but retain everything from the two files including version number.

Suppose I have two XML files. First XML File: <?xml version="1.0"?> <AccessRequest xml:lang="en-US"> <AccessLicenseNumber>Your_License</AccessLicenseNumber> <UserId>Your_ID</UserId> <Password>Your_Password</Password> </AccessRequest> Second XML File: <?xml version="1.0"?> <RatingServiceSel...

xsl:template match for xml with prefixes

I have this xml file <?xml version="1.0" encoding="UTF-8"?> <bo:C837ClaimParent xsi:type="bo:C837ClaimParent" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bo="http://somelongpathHere/process/bo"&gt; <claimAux> ... </claimAux> <enterpriseClaim> ... <patientAccountNumber>data to capture here</patientAccountNumbe...

How to check if an XMLList is empty in Flex

If I have an XMLList object in Flex, what is the proper way to check to see if the list is empty? Should I just compare the result of myList.length() > 0, myList.toString() != "" or try another method altogether? ...

How to use LINQ to get method name and namespace in a soap request?

Hi, How to extract method name and namespace from this xml using LINQ to XML? <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/add...

Entity Framework with XML file as the data source

Is there a way to somehow map an XML file to entities, so that I can use Entity Framework with XML file as the data source. XML file is very similar to a database anyway. ...

XPathSelectElement vs Descendants

I was wondering if there are any performance differences when using simple queries as: var x = document.XPathSelectElement("actors/actor") vs var x = document.Descendants("actors").Descendants("actor") ...

Alter XML while preserving layout

What would you use to alter an XML-file while preserving as much as possible of layout, including indentation and comments? My problem is that I have a couple of massive hand-edited XML-files describing a user interface, and now I need to translate several attributes to another language. I've tried doing this using Python + ElementTree...

PHP DomDocument Save XML with HTML

Hi, How would I save an XML file opened with DomDocument so that the HTML inside won't be encoded into HTML entities? ...

XMl Serialization of Linq-to-Sql objects?

I am working on an Audit Log for an application that uses Linq-To-Sql. I want to serialise an object to stores its values in a XML column in a SQL Server databse. My problem is that when I try to serialize a Linq-To-Sql obejct that it attempts to serialize all associated entities and entity sets. My first attempt at a solution was t...

NSXMLParser foundCharacters method!?

Hey! i'm using the NSXMLParser to fetch a String from xml. I'v created a class to store the data with synchronized variables. To get the text between the elementName i use the foundCharacter function. And to store the Strings i use a MutableString *. When i find the String and print everything is correct but when i'm done the two differ...

How to validate a xml file against a given xsd file while parsing it with a sax parser?

I want to parse a xml file using a SAXParser or XMLReader and verify that the file conforms to a specific xsd file (new File( "example.xsd" )). It's easy to do the validation against a xsd file in an extra step using a Validator like in this SO answer. to validate while parsing by specifying the name of the xsd as "http://apache.org/...

Reading an xml value into a property for Wix

In my application installer, I want to read credentials for logging into a database from an xml file. Is there any way that I can do this. If I had to use custom actions, how would I assign the return value into the property? ...

Convert XML to rows

Let's say i've got xml stored in a database. It contains a list of contacts, like so: <Person> <Name>Irwin</Name> <Address>Home, In a place</Address> <Contact type="mobile">7771234</Contact> <Contact type="home">6311234</Contact> <Contact type="work">6352234</Contact> <Contact type="fax">6352238</Contact> </Person> It's stored ...

OC4J orion-application.xml - elements and attributes mapped to deployment plan properties

Hi. i read in oracle docs sentense like this: "Each property maps to an element attribute in the orion-application.xml descriptor." These properties are from deployment plan and i need to know what is the name of the element in orion-application.xml wich is mapped to webSiteBinding property (from deployment plan). ...

Generate xml from csv data in conformance with given xsd schema

I have an xml schema and csv data to generate corresponding xml files. I found this, how to generate xml files from given CSV file. But with my schema, it's always the same mapping because of the element. So the last 5 columns are mapped according to the DataType column. I could expand the code with case switch, and map every element ...

What is an xs:NCName type and when should it be used?

I ran one of my xml files through a schema generator and everything generated was what was expected, with the exception of one node: <xs:element name="office" type="xs:NCName"/> What exactly is xs:NCName? And why would one use it, rather xs:string? ...

Trouble using XmlTextWriter with MemoryStreams

I'm having trouble getting a memory stream and a XML text writer class to work together properly. Context.Reponse.BufferOutput=true; Context.Response.ContentType = "application/xml"; stmOutput = new MemoryStream(); Output = new XmlTextWriter(stmOutput, Encoding.ASCII); Output.WriteStartDocument(); Output.WriteStartElement("MyTag"); Outp...

xsl-fo block-quotes with quote marks

Hi, I am trying to code a something quite simple which is complicated greatly by xsl-fo inline and block level elements. Here is a sample of the XML: <quote-block open="&quot;" close="&quot;"> <quote-para>text...</quote-para> <list> <item>...</item> <item>...</item> </list> <quote-paragraph> <para>...</pa...