xml-parsing

.NET DataSet.GetXml() - what's the default encoding?

让人想犯罪 __ 提交于 2019-12-24 09:38:25
问题 Existing app passes XML to a sproc in SQLServer 2000, input parameter data type is TEXT; The XML is derived from Dataset.GetXML(). But I notice it doesn't specify an encoding. So when the user sneaks in an inappropriate character into the dataset, specifically ASCII 146 (which appears to be an apostrophe) instead of ASCII 39 (single quote), the sproc fails. One approach is to prefix the result of GetXML with <?xml version="1.0" encoding="ISO-8859-1"?> It works in this case, but what would be

SQL Server 2014 - Parsing XML with Cyrillic Characters

杀马特。学长 韩版系。学妹 提交于 2019-12-24 09:17:08
问题 I'm parsing an xml file but have problem with cyrillic characters: this is the relevant part of the stored Procedure SOAP input to parse: '<?xml version="1.0"?> <soapenv:Envelope xmlns:.......> <soapenv:Header> </soapenv:Header> <soapenv:Body> <GetResponse> <BuyerInfo> <Name>Polydoros Stoltidys</Name> <Street>Луговой проезд дом 4 корпус 1 квартира 12</Street> </BuyerInfo> </GetResponse> </soapenv:Body> </soapenv:Envelope>' Stored Procedure CREATE PROCEDURE dbo.spXML_ParseSOAP ( @XML XML ) AS

modify my xml file via php form

£可爱£侵袭症+ 提交于 2019-12-24 09:06:42
问题 This is my xml file and my php code below. I have put an input type which will search student by firstname. Then information about specific student will appear and another button update will appear. The issue is that I want to modify the information after that. How can I get the element by tag name so that I can modify the information about the specific student? <students> <student> <firstname>John</firstname> <lasttname>Snow</lasttname> <student_id>160600</student_id> <gender>male</gender>

Parse BPEL File to extract activities + XPath

[亡魂溺海] 提交于 2019-12-24 09:03:50
问题 I need to extract the activities and their XPath of a BPEL Process out of the xml file. I'm familiar with the theory behind BPEL but not the fileformat itself. If I read a BPEL file I have difficulties to identify the specific activities. Not to speak of the XPath. How do I parse a BPEL file in a way that I get every activity, no mather what orchestration type, and its XPath? ps: in java EDIT: what I want to extract <name>CallService1Op2</name> <xpath>/process/sequence[1]/invoke[1]</xpath>

CData not being parsed with NSXmlparser

╄→尐↘猪︶ㄣ 提交于 2019-12-24 08:58:09
问题 I receive response in the form of xml from a service,which i parse using nsxmlparser. In an instance i received an xml where the content is same in two tags.(duplicate item as in below xml) Xml received: <UserGeneratedContentItem> <link rel="details" uri="http://api.test.no/test.Ugc/vivo/usergeneratedcontentitem/16046" /> <Data><![CDATA[<Type>Note</Type><Description>**6000 characters**</Description><Page>6</Page><ChapterNumber>1</ChapterNumber><ChapterTitle>Etikk og filosofi</ChapterTitle>

XML parsing error related to char encoding set

你说的曾经没有我的故事 提交于 2019-12-24 08:58:02
问题 I have an valid XML file(valid cause browser can parse it) that I try to parse using JDOM2. The code was running good for other xml files but for this particular xml file it gives me the following exception on builder.build() line : "com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 3 of 3-byte UTF-8 sequence. " My code is as follows import java.io.*; import java.util.*; import java.net.*; import org.jdom2.*; import org.jdom2.input.*; import org.jdom2

How to get value of node list in xml dom parser?

ぐ巨炮叔叔 提交于 2019-12-24 08:56:14
问题 I have one XML which look like this :: <Channels> <Channel Id="511" Title="Test" ChannelDescription="This is Test Channel./> </Channels> I am successfully parse this kind of XML.My Problem is that when i fired the webservice and if there is no authentication from the server then the webservice response like this:: <AuthenticationError>An Active Session Already Exists For This User.</AuthenticationError> So how can i check that root node is "Authentication Error" or "Notes". And if i get the

The application still in ram after using it and take more-2 space each time i play the app?

守給你的承諾、 提交于 2019-12-24 08:33:09
问题 I have worked on the application which I present in the RAM after I am out of my application. Also the size in RAM is increases every time when I play the application. I don't know why it is happening. Please suggest me something. Also I am using timer in my application for 15 sec and after completing the time I show I Dialog that Your time is over. But some times that dialog appear 3-4 times on one time finish of time. This is very embarrassing for my application. Is this thing is due to the

Problem parsing RSS with a PHP script

那年仲夏 提交于 2019-12-24 08:18:49
问题 im using a very common php script to parse RSS; function getRSS($source,$quien) { $start = microtime(true); ini_set('default_socket_timeout', 1); global $arrFeeds, $downItems, $time_taken; $arrFeeds = array(); $ch = curl_init($source); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $content = curl_exec($ch); curl_close($ch); $doc = new DOMDocument(); $doc->loadXML($content); foreach ($doc->getElementsByTagName('item') as $node) { $itemRSS = array ( 'title' => sistema($node-

Can you reuse the same namespace in an XML document

做~自己de王妃 提交于 2019-12-24 08:01:09
问题 Is it valid to have an XML document that uses the same namespace prefix twice? In the following document the s prefix is used twice, but in the nested element the URI is different. Is it valid? <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Declarations> <s:MyObject xmlns:s="library://ns.mysite.com"> <s:Paragraph>hello world</s:Paragraph> </s:MyObject> </fx:Declarations> </s:Application> 回答1: Yes,