xml

Writing XDocument to XLS

I am having my xml data in XDocument (LINQ). I want to write this data into excel data. I am using console application. I dont want to use excel com object. ...

xsl: decision value from element to attribute

I want to use XSL to convert XML to another XML The input xml contains the following element <ViewSideIndicator>0</ViewSideIndicator> which need to be converted to the following <ImageViewDetail ViewSideIndicator="Front"/> in the input file, if the value is "0", then it should be "Front" in the output and if the value is "1", then...

C# XmlTextWriter class and VisualStudio

Hi, I'm trying to use the XmlTextWriter class in C# but it only works if I give the complete path to the file (as in "C:\file.xml"). If I try to use relative path (as in "file.xml"), it creates the file (in the same folder that contais the cs file) but it doesn't show any contents. Is there any property in the project tree in VS I have t...

Should XML elements have grouping parents?

Which convention would be preferred and why (include some pros and cons of one over the other)? This: <company> <employees> <employee /> <employee /> <employee /> </employees> <buildings> <building /> <building /> </building> </company> or this: <company> <employee /> <...

Netbeans: Like XML Syntax-Highlighting

How could I say to Netbeans that it should highlight *.tmx files like they were xml files? ...

Roll your own XML parser / XML parsing algorithm?

So, just as a fun project, I decided I'd write my own XML parser. No, not to parse a specific document, and no, not using an XML parser library. I mean writing code to parse out any XML document into a usable data structure. Just because I like the challenge. :-) With that said, so far it's proved to be... interesting. It's not as easy ...

Retrieved a String from ServletRequest by using getParameter("somename"). How can I turn it back into the XML that it is?

I'm parsing a ServletRequest object(well, a HttpServletRequest really) Have 2 parameters there, one of them I know to have a value which is an XML file. How can I retrieve that XML as Doc or byte[] or similar, rather than String? ...

PHP simplexml_load_file - catch file errors

Hi, Is it possible to catch simplexml file errors? I'm connecting to a webservice that sometimes fails, and I need to make the system skip a file if it returns some http error or something similar. Thanks! ...

What do I specify in my XSD to skip attribute validation for a xml tag.

Hello SO, My xml file is structures like below <outer> <inner name="nam" attribute1="abc" attribute2="def" /> </outer> Now, the only attribute I am assured of in the 'inner' tag is the 'name' attribute. Other than that I do not want to apply any restriction on the name or number of attributes the 'inner' tag can have. That would i...

How to pass xml data from php to flash

How can I pass xml data from php to flash, without using xml file? Sincerely, John ...

Why is XPathNavigator case sensitive?

XPathNavigator navigator = myApp.XML.CreateNavigator(); XPathExpression expression = navigator.Compile("true"); //works XPathExpression expression = navigator.Compile("true or true"); //works XPathExpression expression = navigator.Compile("true OR true) //'System.Xml.XPath.XPathException' ...

How can I write XML data to a file with Perl?

Could you please correct my code below. #!/usr/local/bin/perl open (MYFILE, '>>data.xml'); print MYFILE "<?xml version="1.0" encoding="UTF-8"?>\n"; close (MYFILE); Updated. #!/usr/local/bin/perl open (MYFILE, '>>data.xml'); print MYFILE '<?xml version="1.0" encoding="UTF-8"?\>'."\n"; print MYFILE '<?xml version="1.0" encoding="UTF-...

Ordering XML data randomly generated from RoR

Hey, So I am generating XML data in my RoR application for an external source to consume. The method in my controller is as follows... def allOffers @ridesall = Ride.find(:all) respond_to do |format| format.xml end end I have a allOffers.xml.builder file that looks like this... xml.instruct! xml.rides do @ridesall.each do |r...

how to convert xml string to xml file?

Hi All, I have String in xml format i need to convert that to a xml file,how would i do this? ...

ArrayIndexOutOfBoundsException in xerces parsing

I do not know where the problem is... Help and Thanks! Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 8192 at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:543) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1742) at com.sun.org.apache.xerces....

Sorting XML file

Hi, I need to sort an XML by tag names and attribute. Is it possible using DOM? I need the result in a sorted XML file not HTML. for example: <books> <book id='1'> <name value='N1'/> <author value='A1'/> </book> <book id='3'> <name value='N3'/> <author value='A3'/> </book> <book id='2'> <author value='A2'/> <name val...

asp.net xml editor control

All, I am looking for an asp.net xml editor control. Not a WYSIWYG editor like freetextbox or a javascript syntax highlighter but something that would make editing xml in the browser a bit easier than just as text in a textarea. maybe some non-editable areas, collapsable nodes, xsd validation etc. any ideas? ...

strange pdf generator issue

Is there a problem with xml tags that have a dash in them?? I am trying to generate a pdf from and xsl and an xml.. I have the following for example: <car> <name>toyotoa</name> <color-value>green</color-value> </car> In my xsl I have something like <fo:inline font-weight="bold"> <xsl:value-of select="name" /> </fo:inline> th...

XML edit attributes

Hi, I want to edit the attributes of an element in an XML file. The file looks like <Parameter name="Spec 2 Circumference/Length" type="real" mode="both"> <Value>0.0</Value> <Result>0.0</Result> </Parameter> I want to replace the value and Result attribute with some other value from a text file. Please suggest. Thanks in ...

XDocument comparrison

I have two documents with a simple schema that I need to compare: current doc: <Sections> <Section Number="1"/> <Section Number="2"/> <Section Number="4"/> <Section Number="5"/> </Sections> previous doc: <Sections> <Section Number="1"/> <Section Number="2"/> </Sections> The result of the comparison will be a list secti...