I'm trying to look at the best way of changing the value of an element in XML.
<MyXmlType>
<MyXmlElement>Value</MyXmlElement>
</MyXmlType>
What is the easiest and/or best way to change "Value" in C#?
I've looked at XMLDocument and it will cause a load of the whole XML document to memory. Could you do it safely with the XMLReader....
I have a an attribute who's value may be one or more text strings all delimited by a comma.
I wish to transform using XSL the attribute value(s) into their own element;
e.g
<post title='Hello World" tags="Test,Hello,World />
In which I would like it transformed to;
<post>
<title>Hello World</title>
<tag>Test</tag>
<tag>Hello</tag>
...
I have a template and need to create several xml files. The file contains one variable -this- to replace several times, save it as that name -this-.xml and then repeat for each of the values in my text or excel list or from a database - How would I best go about doing this?
...
Ok, I'm reading data from a stream using a StreamReader. The data inside the stream is not xml, it could be anything.
Based on the input StreamReader I'm writing to an output stream using an XmlTextWriter. Basically, when all is said and done, the output stream contains data from the input stream wrapped in a element contained in a p...
Are there disadvantages of using XML, instead of RDMS? The reason I ask this is because my data is more naturally represented by XML structure, rather than RDBMS. I initially thought of storing the data in relational database, but the lack of flexibility of relational database to handle tree-like data structure was putting me of. So I am...
What is the best way to represent in java a "choice" namespace tag?
ie.
<xs:complexType name="MyType">
<xs:sequence>
<!-- common elements here -->
<xs:element type="xs:string" name="name" ... />
</xs:sequence>
<xs:choice>
<xs:element name="stringValue" type="xs:string"></xs:element>
<xs:element name="intValue" type...
Is there any way to restrict the use of an XML element's sub elements, depending on the attribute value of the parent element in XML Schema? How does the schema have to look like?
<option name="mike" value="excset">
<excludingsets>
<excludingset>
<option name="hd"/>
</excludingset>
</excludingsets>
</option>
<option na...
Given:
Two similar and complex Schemas, lets call them XmlA and XmlB.
We want to convert from XmlA to XmlB
Not all the information required to produce XmlB is contained withing XmlA (A database lookup will be required)
Can I use XSLT for this given that I'll need to reference additional data in the database? If so what are the argum...
I have a XML File and I want to read the data and assign it to a string array, so Operative would be assign to 1 array and JobLocation to another
<Demo>
<JOBOperatives>
<Operative>
<Clock>aaaa</Clock>
<Name>aaaaa</Name>
<MobileNumber>00000000010</MobileNumber>
<OperativeTrade>3</OperativeTrade>
<OperativeTicket>1</Operati...
My question is how can I load a grammar file that uses the tags they list in the MSDN docs?
I want to use the format tags that are documented in MSDN under the heading Grammar Format Tags (SAPI 5.3).
http://msdn.microsoft.com/en-us/library/ms723634(VS.85).aspx
There it lists tags like DEFINE, LIST, OPT etc. However whenever I try to ...
I would like to generate a tree diagram out of an XML schema definition. Liquid XML Studio has a visual XSD tree editor, and lets me save my tree as a .png file, which fulfills some of my needs. But I am wondering if there is a tool out there that lets users convert XSD files to web pages, where the diagram can be clicked, expanded, and ...
i want to send the xml of an XmlDocument object to the HTTP client, but i'm concerned that the suggested soltuion might not honor the encoding that the Response has been set to use:
public void ProcessRequest(HttpContext context)
{
XmlDocument doc = GetXmlToShow(context);
context.Response.ContentType = "text/xml";
context.Resp...
I am looking for an XML comparing tool that understands xml. It cannot be a line by line comparision like WinMerge or Beyond Compare.
An ideal solution would be one that shows changes similar to the way Word 2007 shows track changes. DeltaXML does this, but does not come with a real GUI 'out of the box' and is $500 per user!:
Xamxm...
I've written a java application that utilizes JAXB for XSL transforms. I've included the saxon9.jar in my classpath so that I can use XSLT 2.0 rather than XSLT 1.0 on the command line.
java -classpath ./lib/saxon9.jar:./ -jar myApp.jar
I've included code in my XSL to report the XSLT used.
<xsl:comment><xsl:text >
</xsl:text>XSLT Ver...
I'm using Dom4J 1.4.2.
Right now my code creates a new SaxReader every time I want to parse a new XML document:
SAXReader reader = new SAXReader( );
Is there any value in creating a pool of SaxReader objects and just reusing them? How much overhead is involved in creating a new SaxReader on every call?
My code could get one from t...
I'm trying to submit an HTML form to an action of an XML page. The XML page is called, for instance, myXMLPage.xml. The action name would be myAction. In the form action tag this is what I have:
<form action="myXMLPage.xml/myXMLPage.myActoin">
</form>
I know this is probably wrong, but I can't figure out what's correct.
Can someone ...
What's the best approach for reading in XML data and building a query to insert the values into a SQL Server DB?
Anyone have a best approach for this type of scenario?
...
I know namespace are used to describe, like doctype, but is there a way or a trick to transform inner namespace html with an xsl using xsd ?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" x...
I have converted a complex XML File to a Dataset that has 7 Tables and around 70 Columns I have created the tables in SQL Server to match the ones in the Dataset using the XML Schema. How can I easily write my Dataset to the SQL tables?
...
AJAX actually means Asynchronous Javascript And XML. This term was derived because (as I know the story) the first people who started this process transferred data from the server to the client via XML. Lately (well ever since I've started using it actually), JSON has been around and appears to be a real alternative to XML. From my (p...