I have xml documents in a database field. The xml documents have no whitespace between the elements (no line feeds, no indenting).
I'd like to output them to the browser, formatted nicely. I would simply like linefeeds in there with some indenting. Is there an easy, preferably built-in way to do this?
I am using ASP.NET 3.5 and C#. Thi...
I'm trying to consume some legacy XML with elements like this in JRuby:
<x-doc attr="value">
<nested>
<with.dot>content</with.dot >
</nested>
</x-doc>
I've been working with Hpricot, but Hpricot's HTML-oriented shortcuts are working against me: doc.search("//with.dot") seems to be looking for <with class="dot" />
(I ran into ...
I have an application where I need to parse or tokenize XML and preserve the raw text (e.g. don't parse entities, don't convert whitespace in attributes, keep attribute order, etc.) in a Java program.
I've spent several hours today trying to use StAX, SAX, XSLT, TagSoup, etc. before realizing that none of them do this. I can't afford to...
I was wondering if anyone knew how to convert an array to a Simplexml object in PHP.
Thanks
...
Hi there,
I am working on an enterprise system that will utilise a RESTful web service between mobile clients and a central server. As RESTful as possible, let's say.
My question relates to HATEOAS (hypermedia as the engine of application state), and the use of custom xml in HTTP response bodies.
This system will never ever be used by...
Hi,
I have made an iphone application in which data is retrieved from remote server through xml saved. I want to retrieve images also with in the XMl and have to show them in my iphone application stored on server. Please help how this can be achieved.
...
Hello,
I'm diving into javascript and one of the concepts I'm playing with is XML parsing. I see that IE has its own parser, as does Firefox. I also see XML parsers built into some of the javascript frameworks like JQuery. My questions are...
What's the most common or best way to parse XML using javascript these days?
If I use the ...
I have to create one table using XSLT and CSS. The table should look like:
ID FNAME
1 AA
2 BB
My XML is:
<students>
<studentDetails>
<id>1</id>
<fname>AA</fname>
</studentDetails>
<studentDetails>
<id>2</id>
<fname>BB</fname>
</studentDetails>
<students>
And here my XSLT so far:
<xsl:template matc...
I have frequent need to test that XML files are correct and need a way of testing that 2 XML strings (or documents) are identical, such as:
XMLAssert.assertEquals(String xmlExpected, String xmlActual);
In addition it would be useful to show where the xml documents differed.
This should be restricted to documents with standalone="yes...
I am using XML to share HTML content. AFAIK, I could embed the HTML either by:
Encoding it: I don't know if it is completely safe to use. And I would have to decode it again.
Use CDATA sections: I could still have problems if the content contains the closing tag "]]>" and certain hexadecimal characters, I believe. On the other hand, th...
I am having problems serializing a cdata section using c#
I need to serialize XmlCDataSection object property as the innertext of the element.
The result I am looking for is this:
<Test value2="Another Test">
<![CDATA[<p>hello world</p>]]>
</Test>
To produce this, I am using this object:
public class Test
{
[System.Xml.Serial...
I'm using the simplexml extentsion and AMFPHP to send xml data to flash.
Say I have this xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<people>
<person>
<name>bob</name>
</person>
</people>
And I load it in with simplexml_load_file().
When I do this:
$name = $xml->person[0]->name;
return $name;
it returns "<name>bob</nam...
I'm working on an application that uses XSLT to transform XML generated by JSP. At the moment no DTD exists to describe the XML format the XSL expects. Does anyone know of a tool that can generate a DTD from a XSL describing the input the XSL is expecting? Is this even feasible?
Result: The accepted answer pointed out that this is in fa...
Is there any free xml/json whois service for unlimited queries?
...
The file format I'm working with (OFX) is XML-like and contains a bunch of plain-text stuff before the XML-like bit begins. It doesn't like having between the plain-text and XML parts though, so I'm wondering if there's a way to get XmlSerialiser to ignore that. I know I could go through the file and wipe out that line but it would be s...
I'm putting together an xml schema for a simple xml (see bellow for both xml and schema). But I keep getting the following error with regards to the section node: "The element cannot contain white space. Content model is empty." . Browsing the net I could not find any concise explanation as to what it means so I can fix it. Can anyone he...
Hi all!
I've added several pages (cms) in my magento admin panel. I know i can attach blocks to a specific page by using {{block..}} within the content field.
However, i dont want to define blocks there, but within the cms.xml file. So other store admins are not annoyed by weird codes ({{block..}}) in the backend editor.
I've defined ...
I was trying to validate an XML signature.
The validation according to this tutorial works fine.
But I also tried to a second approach. To verify it with the verify method of the Signature class
I extracted the signature and the certificate from the xml file, and I did the following:
public static boolean checkSignedFile(byte[] ...
I'm attempting to apply a stylesheet to an XML document using Saxon. Given an XML file that was generated in Microsoft Word and that has Microsoft Word-style quotes, such as around FOO in the following document
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<act>
<performer typeCode=“FOO“ />
<performer typeCode="BAR" />
...
I have a lots (500ish) xml files from An old ASP and VBscript that was running on an old windows server. The user could click a link to download the requested xml file, or click a link to view how the xml file will look, once its imported into their system...
If clicked to view the output, this opened a popup window were the xml filena...