xml-parsing

unexpected character while parsing XML from batch script

天大地大妈咪最大 提交于 2019-12-12 01:26:33
问题 I am getting this error when I am trying to parse XML from batch Script error : < was unexpected at this time. xml: <driver type=".dbdriver"> <attributes>localhost;1521;XE;false</attributes> <driverType>Oracle thin</driverType> </driver> <password>7ECE6B7E7D2AF514C55BAE8B3A6B51E7</password> <user>JR</user> batch scrpit: for /f "tokens=3 delims=><" %%j in ('type %SETTINGSPATH% ^| find "<user>"') do set user=%%j This code is supposed to read user value from XML which is just "JR" and on some

how to get % from web-service in iphone

本秂侑毒 提交于 2019-12-12 01:07:06
问题 I'm new in iPhone development.I'm developing one chatting application.i was facing problem while sending and receiving some special character.finally, i succeeded to post and get this special character.now,there is only one special character which i'm not able to get it.while i'm sending % to the web-service,i get %25. At sending string to web-serive use bellow string.. NSString *string = @"Hello % How Are You?"; string = [string stringByReplacingOccurrencesOfString:@"%" withString:@"%25"];

Connection disconnects with error “internal error” code=1 ErrorDomain=libxmlErrorDomain after XMPPframework sends auth to the server

依然范特西╮ 提交于 2019-12-12 00:50:52
问题 I am using XMPPFramework to connect to my xmpp server on local network ,it connects but as soon as it sends the auth packet and recieves challenge it disconnects with error : "internal error" code=1 ErrorDomain=libxmlErrorDomain. Basically it is not able to parse the challenge : 2013-03-08 15:56:41.890 iPhoneXMPP[23710:13703] Data to be parsed <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl"

How to show location on a map taking longitude and latitude values from XML [duplicate]

戏子无情 提交于 2019-12-12 00:43:29
问题 This question already has answers here : multiple markers on google maps from xml file (2 answers) Closed 4 years ago . This is an XML entry and it takes geolocation from PHP form. I want to display those values as a map in HTML: <entries> <entry> <name>Anny</name> <email>anny1@hotmail.com</email> <place>Fridays</place> <comment>Very Good</comment> <food>Jack Daniels Burger</food> <kitchen>American</kitchen> <rating>5</rating> <latitude>34.7618259</latitude> <longitude>33.0283905</longitude>

How to get an specific node in xml with namespaces?

强颜欢笑 提交于 2019-12-12 00:39:28
问题 I'm dealing to access an specific node from a XML Document. I realized that this one as a base namespace. Here is the example. I'm interested to get the value of the node d:MediaUrl from all descendents node (entry). And I haven't accomplished that. When I debug the variable iterator 'i', I can see that the XML includes the default namespace again, something like: <entry xmlns="http://schemas.microsoft.com.ado/..." And also I have to include the another namespace called 'd'. What can I do to

simplexml_load_file - redundant element with empty value is converted to new SimpleXMLElement Object

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 00:35:47
问题 I converting a XML-File into an Object using simplexml_load_file. I noticed a problem when a redunant element has a empty value. I think this example make it more understandable: // XML-File (Just a small excerpt look at "...") ... <Team uID="t684"> ... <Player loan="" uID="p20388"> <Name>Manuel Neuer</Name> <Position>Goalkeeper</Position> <Stat Type="first_name">Manuel</Stat> <Stat Type="last_name">Neuer</Stat> <Stat Type="middle_name"></Stat> <Stat Type="known_name"></Stat> <Stat Type=

XSL transformation give me wrong encoding

久未见 提交于 2019-12-12 00:28:24
问题 I got a xsl-file that transform a xml-file to another one, with different xml-format. The xsl-file starts with: ?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" And then the output starts with: <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> And the rest of all elements that will be transformed, like alot of lines as: <xsl:element name="tns:corporateName" >

XmlResourceParser.getText() returning null

元气小坏坏 提交于 2019-12-12 00:25:47
问题 I have an XmlResourceParser instance called xml . When I try to call getText() on a node, as seen in my code, it returns null. This is strange because I can call getName() on the same node it returns the proper value, so the instance is set up properly. Here is my code: XmlResourceParser xml = context.getResources().getXml(R.xml.thesaurus); try { //if (xml.getName().equals("word")) { xml.next(); //to the first node within <word></word> boolean notFound = true; while (notFound) { xml.next();

Xml Dom Parsing in J2ME

谁说我不能喝 提交于 2019-12-12 00:21:59
问题 In my J2ME Application, I can get the xml data as a string from Server, but I can't be able to read the tag and its elements through code. Please suggest me some solution for it. 回答1: If your target device has JSR 172 you can use SAX or DOM . If not you can try kxml2. There is a nice introduction to it at http://www.developer.nokia.com/Community/Wiki/XML_Parser_in_Java_ME 来源: https://stackoverflow.com/questions/12858576/xml-dom-parsing-in-j2me

How to generate instance name dynamically?

梦想的初衷 提交于 2019-12-12 00:09:21
问题 I need to set the name of an instance of a class dynamically. GetDataPoint "This Name has to be dinamically" = new GetDataPoint(); I need dynamic numbers of instances of this class GetDataPoint. Can anyone help please? 回答1: An example: ArrayList<GetDataPoint> data = new ArrayList<GetDataPoint>(); int amountOfData = 5; for(int i = 0; i <= amountOfData; i++) { data.add(new GetDataPoint()); } Loop over the data list to retrieve the GetDataPoints. 来源: https://stackoverflow.com/questions/16171941