xml

Scala: XML Whitespace Removal?

Anyone know of a good scala library to do whitespace removal/compaction from XML? <foo> <bar>hello world</bar> <baz> xxx </baz> </foo> to: <foo><bar>hello world</bar><baz>xxx</baz></foo> -harryh ...

Building Excel Files with C#

I need to create an excel file via C#. I have read a few places that creating an XML document is the easiest way to do this? I need to have multiple named tabs and be able to specify that particular cells are text, date time, numeric, etc... Any suggestions or good examples? ...

Flex renderer data inside a panel...

I have a page (below) that has a datagrid that lists "item"'s returned from an XML file (below) and when it loads it created a page in the viewstack for each item it finds (working) it also renders a page (below) inside each panel but i am having issues passing the data. Each page renders and loads but with the FIRST result of the XML da...

How to put XML element's content into XUL template?

Hi, I've gotten trouble with passing XML data into XUL template. Look: For example, we have the datasource XML with the next structure: <people> <person name="Joe"/> <person name="Tom"/> <person name="Lisa"/> <person name="Bob"/> </people> In this case we may use the next template in XUL: <template> <query expr="person"/> <ac...

please, i need explanation of this code

hi, im quite new to xml, can someone tell me what exactly this code is code is supposed to do? <?xml version="1.0" encoding="ISO-8859"?> <!DOCTYPE person [ <!ELEMENT first_name(#PCDATA)> <!ELEMENT last_name(#PCDATA)> <!ELEMENT PROFESSION(#PCDATA)> <!ELEMENT name(first_name, last_name)> <!ELEMENT person (name, profe...

JavaScript/jQuery: How do I get an array of all attributes in an XML element?

Given an XML element in jQuery like so: $('<foo oy="vey" foo="bar" here="is" another="attribute" />') Can I use either jQuery or plain old JavaScript to get an array containing the names of all the attributes in an XML element? I would expect this: ['oy','foo','here','another'] ...

How to parser XML exactly XLIFF files and get the *source* content in PHP

How to parser XML exactly XLIFF files and get the source content in PHP. how to get the source content of the xml file http://docs.oasis-open.org/xliff/v1.2/cs02/Sample%5FAlmostEverything%5F1.2%5Fstrict.xlf ...

Removing XML entities from string in Ruby

Hi, I try to parse RSS chaanal with simple-rss lib. Unfortunately I got a lot of garbage in node: <description>&lt;p&gt; some decryption &lt;/p&gt; &lt;a href="http://url.com/trac/xxx/wiki/foo?action=diff&amp;amp;amp;version=28"&amp;gt;(diff)&amp;lt;/a&amp;gt;&lt;/description&gt; I need to retrieve text ("some description") and o...

Generating XML from SPList as per given schema

hi I have one SPList with data , and oe XML schema file, my requirement is to get the data into XML file using the given schema file. HOw can i do that in Sharepoint using c# code? thanks Azra ...

Retrieving attributes from a SimpleXMLElement

How would I get to the name variable given the object. $obj->@attributes['name']; would obviously not work. SimpleXMLElement Object ( [@attributes] => Array ( [name] => Address ) [value] => Address ) ...

How to Parse XML File in PHP

The XML file is here. How can I get the source content in this XML file? ...

Grouping by 2 fields in XSL

I have next xml: <page> <document> <id>1001</id> <cur>USD</cur> <date>01.01.2009</date> <amount>10</amount> </document> <document> <id>1001</id> <cur>USD</cur> <date>02.01.2009</date> <amount>15</amount> </document> <document> <id>1001</id> <cur>JPY</cur> <...

java.net.MalformedURLException: no protocol

Im getting Java exception like: java.net.MalformedURLException: no protocol My program trying to parse XML string by using Document dom; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); dom = db.parse(xml); The XML string contains: String xml = "<?xml version=\"1.0\" ...

How to handle different versions of xsd files in one java application?

The Facts In my java application I have to handle XML files with different schema versions (xsd files) simultaneously. The content of the XML files changed only a little between the different versions, so I'd like to use mainly the same code to handle it and just do some case distictions dependent on the version of the used schema. Cur...

Multi-dimensional arrays in Linq

Hey there! I have an XML file similar to the following: <novel> <paragraphs> <paragraph> <choice>This is paragraph 1</choice> <choice>Paragraph 1 alternative text</choice> </paragraph> <paragraph> <choice>This is paragraph 2</choice> <choice>Paragraph 2 alternative text</choice> ...

File Handling Issue

hi all, I am developing a tool in c#, at one instance I start writing into a xml file continuously using my tool,when i suddenly restart my machine the particular xml file gets corrupted, what is the reason an how to avoid it? xmldocument x= new xmldocument(); x.open(); // change a value of the node every time x.save(); x=null this i...

Is there any way to restict the marshalling depth for object graphs in JAXB?

I'm using JAXB for quick-and-dirty XML generation. I have a class that represents a tree structure: @XmlRootElement(name = "element") public class Element { // [...] @XmlElementWrapper(name="childs") @XmlElementRef public List<Element> getChilds() { /*...*/ } } I want to restrict the depth up to which the child collection is...

How to write an external binding file for xjc?

The documentation of JAXB xjc says: -b Specify one or more external binding files to process. (Each binding file must have it's own "-b" switch.) The syntax of the external binding files is extremely flexible. You may have a single binding file that contains customizations for multiple schemas or you can break the customizatio...

Fast way to filter illegal xml unicode chars in python?

XML specification lists a bunch of Unicode characters that are either illegal or "discouraged". Now, given a string, what is the best way to remove all those illegal chars from it? Right now, my best bet is a regular expression, but it's a bit of a mouthful: illegal_xml_re = re.compile(u'[\x00-\x08\x0b-\x1f\x7f-\x84\x86-\x9f\ud800-\udf...

How to avoid creation of xml tag for properties which has the value Nothing in WCF?

Suppose i have a service, where i give some input , and i am setting the properties of Name and Age as Nothing Name and Age are nullable types. Now as Name and Age are nothing i do not want a xml tag generated in the output.But below xml tags are generated with nil=true. <Name xsi:nil="true"/> <Age xsi:nil="true"/> ...