xml-parsing

How to parse SAP business connector link in iPhone using Obj-C?

北慕城南 提交于 2019-12-12 05:48:38
问题 I have SAP business connector URL which opens in XML format in browser. When I paste SAP BU URL in browser, the pop up opens with asking user ID and password. Then after entering the password it shows XML format data. I know how to parse XML file in iPhone but that method is not working with this SAP url. What are the steps required to fetch data from this kind of url which have User ID & pwd in iPHone using xcode, objective C? Updated with Code - (void)applicationDidFinishLaunching:

Wildcard search at any nested depth using xml.etree.ElementTree

一个人想着一个人 提交于 2019-12-12 05:48:15
问题 I have a group of XML files which contain entries like <group name="XXX common string"> <value val="12" description="a dozen"> <text>one less than a baker's dozen</text> </value> <value val="13" description="a baker's dozen"> <text>One more than a dozen</text> </value> </group> <group name="YYY common string"> <value val="42" description="the answer"> <text>What do you get if you multiple 6 by 9?</text> </value> </group> Is there any simple way, using import xml.etree.ElementTree as ET and

Get attibuteDict of a subclass Xml parsing - Swift

故事扮演 提交于 2019-12-12 05:37:16
问题 I want to get attribute of a subclass of my item : <pdv id="1000002" latitude="4621842" longitude="522767" cp="01000" pop="R"> <adresse>16 Avenue de Marboz</adresse> <ville>BOURG-EN-BRESSE</ville> <ouverture debut="01:00" fin="01:00" saufjour=""/> <services> <service>Automate CB</service> <service>Vente de gaz domestique</service> </services> <prix nom="Gazole" id="1" maj="2015-05-30 11:30:17" valeur="1206"/> <prix nom="SP95" id="2" maj="2015-05-30 11:30:17" valeur="1398"/> <prix nom="SP98"

Descendant command after XDocument.Parse returns NULL in c# WP8

别等时光非礼了梦想. 提交于 2019-12-12 05:25:02
问题 I have a file that I'm opening from the Isolated storage. I'm getting an XML that is string type. I need to parse the XML to get specific field content but having some problems regarding it. I've tried to use XDocument.Parse and got the XML, then I used Descendants and wrote the name of the node I needed , but when debugging it - I see that the returned value is NULL. Can someone please tell me what am I doing wrong? IsolatedStorageFileStream file = storage.OpenFile(txtFilePath, FileMode.Open

XML simplexml_load_file foreach not looping

∥☆過路亽.° 提交于 2019-12-12 04:57:40
问题 I am stuck here with this problem. I have an XML file that LOOKS LIKE THIS: <?xml version="1.0" encoding="UTF-8"?> <ListVehicleInventory xmlns="http://www.starstandards.org/STAR" xmlns:oa="http://www.openapplications.org/oagis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.starstandards.org/STAR/STAR/Rev1.1/BODs/ListVehicleInventory.xsd" revision="1.0" release="8.1" environment="Production" lang="en-US"> <ApplicationArea> <Sender> <Component>XPO<

Using a variable to extract value of property of an element in groovy using xmlSlurper

眉间皱痕 提交于 2019-12-12 04:55:20
问题 I am using SoapUI to test webservices. The following string (in xml format) is my request: <Request> <AC> <AssetID>1</AssetID> <Asset_Name>ABC</Asset_Name> <Asset_Number>1</Asset_Number> </AC> <AC> <AssetID>2</AssetID> <Asset_Name>XYZ</Asset_Name> <Asset_Number>2</Asset_Number> </Ac> </Request> I am using the following code in a groovy script to extract value of Asset_Number for each AC (The above xml string is stored in variable strRequest): def x = new XmlSlurper().parseText("$strRequest")

How to efficiently parse large bz2 xml file in C

徘徊边缘 提交于 2019-12-12 04:54:08
问题 What I want to do: download OSM (OpenStreetMap) data in regular intervals (or update it using diffs) parse that data, which is an bzip2 compressed xml, and store the parts relevant to me in my database, as memory+cpu efficient as possible (runtime is not thaaaat much of an issue) What I have: xxx.osm.bz2 file (bzip2 compressed xml), compressed 29GB, uncompressed about 400GB software is running on debian linux, no vm or anything involved Specific questions, to elaborate what my problem is: I

c# XMLReader skips nodes after using ReadElementContentAs

◇◆丶佛笑我妖孽 提交于 2019-12-12 04:53:05
问题 I am trying to parse an XML file and extract data from elements. The problem is that every time I use ReadElementContentAsX, the reader skips the next element. I don't know why is that. What am I missing? while (reader.Read() && fileValid) { if (reader.IsStartElement()) { Console.WriteLine(reader.Name); switch (reader.Name) { case "ID": if (reader.ReadElementContentAsString() != ID) { fileValid = false; } break; case "Size": if (reader.ReadElementContentAsInt() != EEPROM_SIZE) { fileValid =

how to save XML to a file (filename.xml) using libxml2 ?

我是研究僧i 提交于 2019-12-12 04:49:52
问题 I've configured libxml2 with " --with-minimum -with--schemas " switches (configuration options). I am using "xmlNewNode" "xmlAddChild" etc. functions to generate the XML file. Now, i want to save the XML to a file, but i didn't find any function to do that. Of-course, there are plenty of functions (like xmlSaveFile() etc..) in "libxml2 full version" BUT as i said i've configured it with --minimum configuration option (b/c of memory constraints). Any one with help ? Thanks ! 回答1:

XML Parse only certain child elements

吃可爱长大的小学妹 提交于 2019-12-12 04:48:49
问题 This may be a basic question but, I have a play that is in xml format. I want to grab the speaker and the lines the speaker has in a dictionary in order to add it to an array. Here is the format <SPEECH> <SPEAKER>Narrator</SPEAKER> <LINE>Two households, both alike in dignity,</LINE> <LINE>In fair Verona, where we lay our scene,</LINE> <LINE>From ancient grudge break to new mutiny,</LINE> <LINE>Where civil blood makes civil hands unclean.</LINE> <LINE>From forth the fatal loins of these two