xml-parsing

XML Parsing on sql server [closed]

限于喜欢 提交于 2019-12-13 11:23:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 months ago . How to return data in format: Column Name t01 t02 t03 t04 Data c01 c02 c03 c04 <orders xmlns="www address"> <order> <order-date>2019-09-05</order-date> <created-by>storefront</created-by> <original-order-no>000001</original-order-no> <currency>USD</currency> <taxation>gross</taxation> <invoice-no>0099999<

XSLT :Condition for check if null and empty element then only assign value to other element

耗尽温柔 提交于 2019-12-13 11:09:49
问题 We have input XML.In that,StockCode element is empty for many line items (OrderLineID elements). For all empty StockCode element in XML there must be Comment element value. Similarly,For all such empty Comment elements there must be StockCode Value Exist. Note : OrderDetail is repeating Node here. Scenario : We have to split OrderDescription string . such a way that it always look for empty StockCode element. then only Assign split string values to Comment elements. Otherwise for all

read xml file without any XML module

霸气de小男生 提交于 2019-12-13 10:28:37
问题 I am trying to read a XML form using Perl but I can not use any XML modules like XML::Simple, XML::Parse. It is a simple XML form which has some basic information and a MS Doc attachment. I want to read this XML and download this attached Doc file then print the XML information in the screen. But I don't know any way how I can do this without a XML module , I heard that XML file can be parse using Data::Dumper but I am not familiar with this module, so not getting how to do this. Could you

Call to undefined method DOMElement::appendChid() in php [closed]

拥有回忆 提交于 2019-12-13 09:59:53
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Following is the working code that is generating this XML - Working code link - http://codepad.org/aX5HL6Vp $dom = new DOMDocument('1.0'); $dom->xmlStandalone = false; $manfiestNode = $dom->createElement('manifest',""); $manfiestNodeAttr = $dom->createAttribute('identifier'); $date = new DateTime();

XML Parser from command line in Perl

做~自己de王妃 提交于 2019-12-13 09:51:17
问题 I have an XML data coming from a socket { my $xmlstr = "<ClearQuest login='XXXX' password='XXXX' db='XXX' repo='XXX'><defect id='dts0100' action='view' wait='yes'> </defect> </ClearQuest> "; # read in str (or entire fh) my $exit = 0; # default exit val = okay my @cmdout = (); # init command output my $server = 'ABCSERVER'; # cq server my $eof = '</ClearQuest>'; # end of data tag my $port = 5555; # port address of server my $proto = getprotobyname( 'tcp' ); # get protocol num for tcp my $iaddr

find line number of specific tag of xml file [duplicate]

痴心易碎 提交于 2019-12-13 09:35:11
问题 This question already has answers here : get line number for XElement here (2 answers) Closed 3 years ago . How to find tag and line number of Specific tag of xml file, for example: <sec id="fm.s2"> <title>Acknowledgments</title> </sec> <p>Center for Evidence and Practice Improvement</p> <p>Agency for Healthcare Research and Quality</p> <sec id="fm.s2"> <title>Director</title> </sec> <p>Center for Evidence and Practice Improvement</p> <p>Agency for Healthcare Research and Quality</p> <sec id=

System.Xml.XmlException: Unexpected XML declaration. The XML declaration must be the first

旧街凉风 提交于 2019-12-13 09:34:24
问题 I got this error while Parse an string to XDocument after edit and save it. But anyone can help me locate error position - The Line 1, position 10475. How can i get that position ??? System.Xml.XmlException: Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 1, position 10475. if (storage.FileExists("APPSDATA.xml")) { var reader = new StreamReader(new IsolatedStorageFileStream("APPSDATA

Should we rewrite the XSL in CDuce?

南楼画角 提交于 2019-12-13 09:23:25
问题 We currently have a huge XSLT transformation that takes 20-30 minutes to process. We need to improve the performance and we are considering CDuce. CDuce looks promising. What is a good approach to doing this? Do we have to rewrite the entire xsl logic in CDuce? 回答1: You could rewrite it in another language but there may be easier options, it depends how efficient that XSLT 1 code is. If it uses // a lot then it is not uncommon to get orders of magnitude speed improvement by rewriting it not

Xml Parsing with Dictionary<string, List<MyObject>>

吃可爱长大的小学妹 提交于 2019-12-13 08:59:10
问题 I am working on Windows Phone 8 app development. i have a xml like the below: <array> <dict> <key>SubTopics</key> <array> <dict> <key>ID</key> <array> <string>CD1</string> <string>CD2</string> <string>CD3</string> <string>CD4</string> </array> <key>Title</key> <string>Miscellaneous</string> <key>Desc</key> <string> this is just a text</string> <key>HasItems</key> <true/> </dict> <dict> <key>ID</key> <array> <string>DDC1</string> <string>DDC2</string> <string>DDC3</string> <string>DDC4</string

How to modify the xml value that should reflect in the same xml file using perl?

南楼画角 提交于 2019-12-13 08:57:42
问题 Here is the perl script I have written to modify the particular value from the xml file — neo-datasource.xml . I can print the modified xml contents in the output console using ->toString , but I wish to have these changes to be reflected in the same xml file called neo-datasource.xml instead of printing it in console. Could you please share your ideas? use strict; use warnings; use XML::Twig; my $twig = XML::Twig->new( keep_spaces => 1 ); $twig->parsefile('C:\Users\IBM_ADMIN\Desktop