Get specifc tags from xml file and return them in xml format using xml [duplicate]
This question already has an answer here:
How do you parse and process HTML/XML in PHP?
29 answers
Basic simpleXML working example?
5 answers
assume I have simple xml like this one, and I want to read it in way that I will get the element in xml format.
<?xml version="1.0" encoding="UTF-8"?>
<contentdata>
<Games>
<numberof>2</numberof>
<nameof>
<n1>Game1</n1>
<n2>Game2</n2>
</nameof>
</Games>
<Software>
<numberof>1</numberof>
<nameof>
<n1>Software1</n1>
</nameof>
</Software>
</contentdata>
That means the output after reading should be like below :-
Kindly, assist in any way you can, I will appreciate that.
Thank you.
<Games>
<numberof>2</numberof>
<nameof>
<n1>Game1</n1>
<n2>Game2</n2>
</nameof>
</Games>
php xml
marked as duplicate by Mohammad, Nigel Ren
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 19 '18 at 7:27
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How do you parse and process HTML/XML in PHP?
29 answers
Basic simpleXML working example?
5 answers
assume I have simple xml like this one, and I want to read it in way that I will get the element in xml format.
<?xml version="1.0" encoding="UTF-8"?>
<contentdata>
<Games>
<numberof>2</numberof>
<nameof>
<n1>Game1</n1>
<n2>Game2</n2>
</nameof>
</Games>
<Software>
<numberof>1</numberof>
<nameof>
<n1>Software1</n1>
</nameof>
</Software>
</contentdata>
That means the output after reading should be like below :-
Kindly, assist in any way you can, I will appreciate that.
Thank you.
<Games>
<numberof>2</numberof>
<nameof>
<n1>Game1</n1>
<n2>Game2</n2>
</nameof>
</Games>
php xml
marked as duplicate by Mohammad, Nigel Ren
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 19 '18 at 7:27
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Hi there, please look at this guide how to ask good questions. Stack Overflow is not a free coding service, so please show what you did or use the search function which should give plenty hints on how to do what you want to achieve
– Jan
Nov 19 '18 at 7:21
add a comment |
This question already has an answer here:
How do you parse and process HTML/XML in PHP?
29 answers
Basic simpleXML working example?
5 answers
assume I have simple xml like this one, and I want to read it in way that I will get the element in xml format.
<?xml version="1.0" encoding="UTF-8"?>
<contentdata>
<Games>
<numberof>2</numberof>
<nameof>
<n1>Game1</n1>
<n2>Game2</n2>
</nameof>
</Games>
<Software>
<numberof>1</numberof>
<nameof>
<n1>Software1</n1>
</nameof>
</Software>
</contentdata>
That means the output after reading should be like below :-
Kindly, assist in any way you can, I will appreciate that.
Thank you.
<Games>
<numberof>2</numberof>
<nameof>
<n1>Game1</n1>
<n2>Game2</n2>
</nameof>
</Games>
php xml
This question already has an answer here:
How do you parse and process HTML/XML in PHP?
29 answers
Basic simpleXML working example?
5 answers
assume I have simple xml like this one, and I want to read it in way that I will get the element in xml format.
<?xml version="1.0" encoding="UTF-8"?>
<contentdata>
<Games>
<numberof>2</numberof>
<nameof>
<n1>Game1</n1>
<n2>Game2</n2>
</nameof>
</Games>
<Software>
<numberof>1</numberof>
<nameof>
<n1>Software1</n1>
</nameof>
</Software>
</contentdata>
That means the output after reading should be like below :-
Kindly, assist in any way you can, I will appreciate that.
Thank you.
<Games>
<numberof>2</numberof>
<nameof>
<n1>Game1</n1>
<n2>Game2</n2>
</nameof>
</Games>
This question already has an answer here:
How do you parse and process HTML/XML in PHP?
29 answers
Basic simpleXML working example?
5 answers
php xml
php xml
edited Nov 19 '18 at 8:01
R. Mseti
asked Nov 19 '18 at 7:19
R. MsetiR. Mseti
136
136
marked as duplicate by Mohammad, Nigel Ren
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 19 '18 at 7:27
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Mohammad, Nigel Ren
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 19 '18 at 7:27
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Hi there, please look at this guide how to ask good questions. Stack Overflow is not a free coding service, so please show what you did or use the search function which should give plenty hints on how to do what you want to achieve
– Jan
Nov 19 '18 at 7:21
add a comment |
Hi there, please look at this guide how to ask good questions. Stack Overflow is not a free coding service, so please show what you did or use the search function which should give plenty hints on how to do what you want to achieve
– Jan
Nov 19 '18 at 7:21
Hi there, please look at this guide how to ask good questions. Stack Overflow is not a free coding service, so please show what you did or use the search function which should give plenty hints on how to do what you want to achieve
– Jan
Nov 19 '18 at 7:21
Hi there, please look at this guide how to ask good questions. Stack Overflow is not a free coding service, so please show what you did or use the search function which should give plenty hints on how to do what you want to achieve
– Jan
Nov 19 '18 at 7:21
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Hi there, please look at this guide how to ask good questions. Stack Overflow is not a free coding service, so please show what you did or use the search function which should give plenty hints on how to do what you want to achieve
– Jan
Nov 19 '18 at 7:21