xml

Are there any XML/XSL editors that can show transformations in real time?

I'm converting all of our Crystal Reports to use a home-built reporting system. Essentially, I serialize report objects to XML, transform that with XSL to HTML/CSS. Everything works beautifully, except for the design process. Once I get the XML built correctly, I have to open up the XSL and CSS in SciTE, edit, reload in IE, lather, rins...

XML Serialization, in this case, IXmlSerializable or Attributes

I've done some XML serialization before but i used Attributes, I'm not sure this is doable for my next assignment, here's a brief list of XML manip requirementes. General Purpose XMl manipulation, tied to a treeview, no schema. Load/Save XML. Load/Save Attributes as well as Values (i believe the term is Element Text?), and be mindful o...

how to create an InputStream from a Document or Node

How can I create an InputStream object from a XML Document or Node object to be used in xstream? I need to replace the ??? with some meaningful code. Thanks. Document doc = getDocument(); InputStream is = ???; MyObject obj = (MyObject) xstream.fromXML(is); ...

Passing variables to XSLT

I am new to XML/XSL. I want to be able to pass a var in a rule string and have that return the correct data. Right now I have have this PHP: <?php $params = array('id' => $_GET['id']); $xslDoc = new DOMDocument(); $xslDoc->load("test.xsl"); $xmlDoc = new DOMDocument(); $xmlDoc->load("test.xml"); $xsltProcessor = new XSLTProcessor...

xml output from class

Hello I'm trying to generate xml output (based on a class) that looks like this: <cdsXMLEnvelope> <TestValue1>x1</TestValue1> <inner> <eTestValue1>e1</eTestValue1> </inner> <inner> <eTestValue1>e1</eTestValue1> </inner> <inner> <eTestValue1>e1</eTestValue1> </inner> </cdsXMLEnvelope> [System.Xml.Serialization.X...

Suggestions for making an offline version of an online form?

I work for a school district in which the teachers submit their lesson plans to their principals online. They do this using an online form I wrote using PHP/MySQL and it uses TinyMCE for its textareas. One of the major features that was requested was for teachers to be able to save their incomplete forms as drafts to submit later. This ...

Which characters are Invalid (unless encoded) in an XML attribute?

I can't believe I can't find this information easily accessible, so: 1) Which characters cannot be incorporated in an XML attribute without entity-encoding them? Obviously, you need to encode quotes. What about < and >? What else? 2) Where exactly is the official list? ...

The AJAX response: Data (JSON, XML) or HTML snippet?

I'm just wondering what is an "ideal" output format for the AJAX response? Pure data (JSON, XML) rendered into the page using some client-side JavaScript template engine? Or an HTML snippet rendered into the page "as-is"? What is your preference and why? ...

How to get the grand parent and great grand parent of xml node

any node above the current node in an hierarchical tree example the parent,grandparent,great-grandparent or the rot node are all ancestors of anode within an xml How might I get the grand parent and great grand parent of a current node xml. I'm using VB.Net in an ASP.NET application. thank wow answers are beautiful can i have somethi...

XML creation in blackberry

Hi, I want to create an XML in blackberry as there are classes for that like Document and Element but i want the xml in String format is it any way to that .Is any API avialable in blackberry for doing the same ...

How to load huge (but simple) hierarchical XML file into an SQL table

I have a very large (2.5GB, 55 million node) XML file with the following format: <TopNode> <Item id = "Something"> <Link>A link</Link> <Link>Another link</Link> <Link>One More Link</Link> </Item> <Item id = "Something else"> <Link>Some link</Link> <Link>You get the idea</Link> ...

xjc binding customization does not work in jaxb 2.1.3. It works in jaxb 2.0

I developed a binding customization file in jaxb 2.0 in JDK 1.6.0 and it worked fine. Now I'm using jaxb 2.1.3 in JDK 1.6.0_13 and it gives me errors: Error xxx shows up in more than one properties which is what the binding file is suppose to be handling by renaming them. What happened between 2.0 and 2.1.3 that I need be aware of and...

How to get case-insensitive elements in XML

Hi! As far as I know XML element type names as well as attribute names are case sensitive. Is there a way or any trick to get case insensitive elements? Clarification: A grammar has been defined via XSD which is used for some clients to upload data. The users -the content generators- are creating XML files using different tools but ma...

How to keep whitespace before document element when parsing with Java?

In my application, I alter some part of XML files, which begin like this: <?xml version="1.0" encoding="UTF-8"?> <!-- $Id: version control yadda-yadda $ --> <myElement> ... Note the blank line before <myElement>. After loading, altering and saving, the result is far from pleasing: <?xml version="1.0" encoding="UTF-8"?> <!-- $Id: ver...

SQL Server 2005 XML Queries

Is there a way to apply a schema to an xml column to type values such as Date, int, decimal, etc? Also, when querying the contents with XPath is there a way to do check against the actual type and not its string value? Should we even try this, is there a performance hit with doing raw string checks for these values, or should we even b...

Linq to XML to Generate DDLs

We're storing out database definition as XML in the format at the end of this question. The problem I'm having is getting a list of schemas, the tables in those schemas, the columns in those tables (all with their associated information). My current code (included below the sample XML) grabs everything, completely ignoring nesting and, d...

Use XslCompiledTransform with cdata-section-elements

I want there to be CDATA sections in my output XML. I have tried to use the "cdata-sections-element" attribute of xsl:output. However, I don't get CDATA in my output. using System; using System.Xml; using System.Xml.Xsl; using System.IO; using System.Text; namespace ConsoleApplication1 { class Program { static void Mai...

SQL Server: How to get hold of XML attributes in a query?

I'm currently trying to get all of the attributes from some XML with an SQL query. I've been attempting the following to retrieve it, but I must be missing something rather fundamental. DECLARE @T varchar(max) SET @T = '<root> <Field FieldRowId="1000"> <Items> <Item Name="CODE"/> <Item Name="DATE"/> </Items> <Attribute...

Getting SimpleXMLElement to include the encoding in output

This: $XML = new SimpleXMLElement("<foo />"); echo($XML->asXML()); ...outputs this: <?xml version="1.0"?> <foo/> But I want it to output the encoding, too: <?xml version="1.0" encoding="UTF-8"?> <foo/> Is there some way to tell SimpleXMLElement to include the encoding attribute of the <?xml?> tag? Aside from doing this: $XML = ...

Streaming Parsers (JSON/XML) for AS3/Flex/Adobe AIR application

Are there any stream-reading, parsing libraries available for json or xml formats in AS3? I'm setting up a long-polling application, using URLStream/URLRequest. I do not have control over the data I'm receiving other than a choice between formats. I'd like to have a parser that can handle fragments at a time, which would allow me to t...