Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~3K People Reached
Favorite Tags
Member Avatar for Osagie_1

I have an xml structure : <Pages> <!--This is the root node--> <Home> <url>...</url> <menu> <item>Help</item> <item>About</item> <item>Contact</item> </menu> </Home> <Help> <url>...</url> <menu> <!--i need to select this if its parent(Help) is listed in Home/menu/item above--> <item>Business Help</item> <item>Web Help</item> <item>Tour Help</item> </menu> </Help> <About> <url>...</url> <menu> <!--And Or select …

0
127
Member Avatar for Osagie_1

I have an xml structure : <Home> <url>...</url> <menu> <item>Help</item> <item>About</item> <item>Contact</item> </menu> </Home> <Help> <url>...</url> <menu> <!--i need to select this if its parent(Help) is listed in Home/menu/item above--> <item>Business Help</item> <item>Web Help</item> <item>Tour Help</item> </menu> </Help> <About> <url>...</url> <menu> <!--And Or select this if its parent(About) is listed …

0
151
Member Avatar for Osagie_1

I've a json structure : { "Photos":{ "Photo":[ { "ID" : 111, "type" : "JPEG", "URL": "blabla" }, { "ID": 222, "type": "JPG", "URL": "blaaaaaaaaa" } ] } } Using php-jsonpath only (By stefan Goessner : http://goessner.net/articles/JsonPath), I want to insert a new data (array) into photo identified by 222 …

Member Avatar for Traevel
0
276
Member Avatar for Osagie_1

<Root> ... <A CHANGE_THIS="Dont_ChengeME"> <B></B> </A> ... </Root> trying to change the attribute name of element A to something of my choice, using php's simpleXML API. here's what i've done: $xml = simplexml_import_dom($xmldom); $query = "root/A[@]"; $result = $xml->xpath($query); if(!empty($result)) $result['CHANGE_THIS'] = "Blalalalal"; //i believe this is where am doing …

Member Avatar for diafol
0
125
Member Avatar for Osagie_1

i have an xml structure: <root> ... <B ID="444"> <C></C> <D>Anything</D> <E> <child1 /*expected outcome came in here*/> /*sometimes here*/ </child1> <child2>data2 <!-instead of here-></child2> <child3>data3</child3> <child4>data4 /* and also here instead*/</child4> </E> </B> ... </root> i made an xpath query to fetch //*B, where child2==data2 and child4==data4 like this: …

Member Avatar for pritaeas
0
215
Member Avatar for Osagie_1

i'am testing an xml structure: <Articles> ... <Article ID="333"> <author>Paul</author> <title>i hate xpath </title> <child1>bla</child1> <child2>blabla <subchild> <subsubchild DEEP = "Attribute"></subsubchild> //this is the value i wanna update and my nightmare </subchild> </child2> <child3>testing</child3> </Article> ... </Articles> what xpath expression will fetch and update (change) the subsubchild attrib node value …

Member Avatar for gusano79
0
190
Member Avatar for Osagie_1

i'am testing an xml structure: <Articles> ... <Article ID="333"> <author>Paul</author> <title>i hate xpath </title> <child1>bla</child1> <child2>blabla <subchild> <subsubchild DEEP = "Attribute"></subsubchild> //this is my nightmare </subchild> </child2> <child3>testing</child3> </Article> ... </Articles> what xpath expression will fetch and update the subsubchild attrib value ? i am mostly concerned with fetching and …

Member Avatar for Osagie_1
0
124
Member Avatar for Osagie_1

<Articles> <Article ID="111"> <author>Peter Paul</author> <pubDate>01/01/2015</pubDate> <Translations> <lang1>English</lang1> <lang2>French</lang2> <lang3>Arab</lang3> <lang3>Chinese</lang3> </Translations> </Article> <Article ID="222"> <author>Monkey Rice</author> <pubDate>01/01/2016</pubDate> <Translations> <lang1>English</lang1> </Translations> </Article> <Article ID="333"> <author>John Silas</author> <pubDate>01/01/2017</pubDate> <Translations> <lang1 country="england">English</lang1> <lang2 country="france">French</lang2> <lang3 country="china">Chinese</lang3> </Translations> </Article> </Articles> I want to select any attribute in the entire document (no matter the …

Member Avatar for mangel.murti
0
117
Member Avatar for Osagie_1

<Articles> <Article ID="111"> <author>Peter Paul</author> <pubDate>01/01/2015</pubDate> <Translations> <lang1>English</lang1> <lang2>French</lang2> <lang3>Arab</lang3> <lang3>Chinese</lang3> </Translations> </Article> <Article ID="222"> <author>Monkey Rice</author> <pubDate>01/01/2016</pubDate> <Translations> <lang1>English</lang1> </Translations> </Article> <Article ID="333"> <author>John Silas</author> <pubDate>01/01/2017</pubDate> <Translations> <lang1 country="england">English</lang1> <lang2 country="france">French</lang2> <lang3 country="china">Chinese</lang3> </Translations> </Article> </Articles> i want to update attribute value "england", as in: ... <Translations> ... <lang1 …

0
91
Member Avatar for Osagie_1

I have an xml structure : <Articles> <Article ID="111"> <author>Peter Paul</author> <pubDate>01/01/2015</pubDate> <Translations> <lang1>English</lang1> <lang2>French</lang2> <lang3>Arab</lang3> <lang3>Chinese</lang3> </Translations> </Article> <Article ID="222"> <author>Monkey Rice</author> <pubDate>01/01/2016</pubDate> <Translations> <lang1>English</lang1> </Translations> </Article> <Article ID="333"> <author>John Silas</author> <pubDate>01/01/2017</pubDate> <Translations> <lang1>English</lang1> <lang2>French</lang2> <lang3>Arab</lang3> <lang3>Chinese</lang3> </Translations> </Article> </Articles> i created a method AddRecordByInfoMatch() that attempts to add …

0
134
Member Avatar for Osagie_1

Can anyone help me clear this issue ? I have a JsonMaker class as: class JsonMaker { protected $jsonObj; protected $path; function __construct($filepath) { $this->path = $filepath; $str = file_get_contents($this->path, true); $this->jsonObj = json_decode($str, false); } public function Test_1($rootName){ $file = file_get_contents($filepath, true); $data = json_decode($file, false); foreach ($data->{$rootName} as …

Member Avatar for broj1
0
127
Member Avatar for Osagie_1

Good day everyone. I am trying to simulate (with php), an xml-like structure for json as follows: { "Articles": [ { "Article": { "ID": 111, "title": Origin of man", "author": "Man and Woman", "pubDate": "21st Feb, 2014", "summary": "Both Idiots" } }, { "Article": { "ID": 222, "title": "Origin of …

Member Avatar for diafol
0
269
Member Avatar for Osagie_1

i have a php methode that checks if a passed in parameter is a date. Here's it: public function is_Date($str){ if (is_numeric($str) || preg_match('^[0-9]^', $str)){ $stamp = strtotime($str); $month = date( 'm', $stamp ); $day = date( 'd', $stamp ); $year = date( 'Y', $stamp ); return checkdate($month, $day, $year); …

Member Avatar for cereal
0
864