How to get the desired substring from a string(xml) in an efficient way?XML Parsing - Read a Simple XML File and Retrieve ValuesHow to check if a string contains a substring in BashHow do I iterate over the words of a string?How do I read / convert an InputStream into a String in Java?How do I get a consistent byte representation of strings in C# without manually specifying an encoding?How to substring a string in Python?How do I make the first letter of a string uppercase in JavaScript?How to replace all occurrences of a string?How to check whether a string contains a substring in JavaScript?Does Python have a string 'contains' substring method?How do I convert a String to an int in Java?
Giant space birds hatching out of planets; short story
Character is called by their first initial. How do I write it?
How do I address my Catering staff subordinate seen eating from a chafing dish before the customers?
Why did Saturn V not head straight to the moon?
Why can't my huge trees be chopped down?
Writing a clean implementation of Rock, Paper, Scissors game in c++
What does コテッと mean?
Is this photo showing a woman posing in the nude before teenagers real?
Are there any examples of technologies have been lost over time?
Assuring luggage isn't lost with short layover
How to start an application when a specific disk is mounted
Terence Tao–type books in other fields?
Trapped in an ocean Temple in Minecraft?
AC contactor 1 pole or 2?
The Sword in the Stone
What is AM-CM inequality?
How can I prevent corporations from growing their own workforce?
Keeping an "hot eyeball planet" wet
Spoken encryption
How to handle a player that cannot be convinced his actions are a problem for both GM and party
Where to place an artificial gland in the human body?
Why are so many countries still in the Commonwealth?
Heisenberg uncertainty principle in daily life
How to avoid unconsciously copying the style of my favorite writer?
How to get the desired substring from a string(xml) in an efficient way?
XML Parsing - Read a Simple XML File and Retrieve ValuesHow to check if a string contains a substring in BashHow do I iterate over the words of a string?How do I read / convert an InputStream into a String in Java?How do I get a consistent byte representation of strings in C# without manually specifying an encoding?How to substring a string in Python?How do I make the first letter of a string uppercase in JavaScript?How to replace all occurrences of a string?How to check whether a string contains a substring in JavaScript?Does Python have a string 'contains' substring method?How do I convert a String to an int in Java?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have C#
application. Below is my string
<subscription_add_ons type="array">
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>bike-o-vision</add_on_code>
<unit_amount_in_cents type="integer">2000</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>boxx</add_on_code>
<unit_amount_in_cents type="integer">1499</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>fitfusion-strala</add_on_code>
<unit_amount_in_cents type="integer">500</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
</subscription_add_ons>
What I need is a substring from the above xml string as below.
<subscription_add_ons type="array">
<subscription_add_on>
<add_on_code>bike-o-vision</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
<subscription_add_on>
<add_on_code>boxx</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
<subscription_add_on>
<add_on_code>fitfusion-strala</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
</subscription_add_ons>
I tried to get it as below.
var xml = _xml.GetXmlNodes(xmlString);
StringBuilder sb = new StringBuilder();
sb.Append("<subscription>");
foreach (XmlNode node in xml)
var sIndex = node.OuterXml.IndexOf("<add_on_code>");
var eIndex = node.OuterXml.IndexOf("</add_on_code>");
var subs = "<subscription_add_on>" + node.OuterXml.Substring(sIndex, (eIndex - sIndex)) + "<quantity>1</quantity>" + " </subscription_add_on>";
sb.Append(subs);
sb.Append("</subscription");
The above snippet always fetches the first substring & to me it looks very inefficient.
How can I get the desired substring from a string(xml) in an efficient way?
Thanks!
c# string asp.net-core stringbuilder c#-7.0
add a comment |
I have C#
application. Below is my string
<subscription_add_ons type="array">
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>bike-o-vision</add_on_code>
<unit_amount_in_cents type="integer">2000</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>boxx</add_on_code>
<unit_amount_in_cents type="integer">1499</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>fitfusion-strala</add_on_code>
<unit_amount_in_cents type="integer">500</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
</subscription_add_ons>
What I need is a substring from the above xml string as below.
<subscription_add_ons type="array">
<subscription_add_on>
<add_on_code>bike-o-vision</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
<subscription_add_on>
<add_on_code>boxx</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
<subscription_add_on>
<add_on_code>fitfusion-strala</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
</subscription_add_ons>
I tried to get it as below.
var xml = _xml.GetXmlNodes(xmlString);
StringBuilder sb = new StringBuilder();
sb.Append("<subscription>");
foreach (XmlNode node in xml)
var sIndex = node.OuterXml.IndexOf("<add_on_code>");
var eIndex = node.OuterXml.IndexOf("</add_on_code>");
var subs = "<subscription_add_on>" + node.OuterXml.Substring(sIndex, (eIndex - sIndex)) + "<quantity>1</quantity>" + " </subscription_add_on>";
sb.Append(subs);
sb.Append("</subscription");
The above snippet always fetches the first substring & to me it looks very inefficient.
How can I get the desired substring from a string(xml) in an efficient way?
Thanks!
c# string asp.net-core stringbuilder c#-7.0
Instead of handling this as a string, use an XML parser stackoverflow.com/questions/5604330/…
– Jasen
Mar 26 at 17:50
If quantity is always1
why do you have it in source xml?
– Sergey Berezovskiy
Mar 26 at 17:51
What doesefficient way
mean? Readable? Maintainable? Performant? Extensible? Some of these don't mix well.
– Erik Philips
Mar 31 at 20:58
add a comment |
I have C#
application. Below is my string
<subscription_add_ons type="array">
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>bike-o-vision</add_on_code>
<unit_amount_in_cents type="integer">2000</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>boxx</add_on_code>
<unit_amount_in_cents type="integer">1499</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>fitfusion-strala</add_on_code>
<unit_amount_in_cents type="integer">500</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
</subscription_add_ons>
What I need is a substring from the above xml string as below.
<subscription_add_ons type="array">
<subscription_add_on>
<add_on_code>bike-o-vision</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
<subscription_add_on>
<add_on_code>boxx</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
<subscription_add_on>
<add_on_code>fitfusion-strala</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
</subscription_add_ons>
I tried to get it as below.
var xml = _xml.GetXmlNodes(xmlString);
StringBuilder sb = new StringBuilder();
sb.Append("<subscription>");
foreach (XmlNode node in xml)
var sIndex = node.OuterXml.IndexOf("<add_on_code>");
var eIndex = node.OuterXml.IndexOf("</add_on_code>");
var subs = "<subscription_add_on>" + node.OuterXml.Substring(sIndex, (eIndex - sIndex)) + "<quantity>1</quantity>" + " </subscription_add_on>";
sb.Append(subs);
sb.Append("</subscription");
The above snippet always fetches the first substring & to me it looks very inefficient.
How can I get the desired substring from a string(xml) in an efficient way?
Thanks!
c# string asp.net-core stringbuilder c#-7.0
I have C#
application. Below is my string
<subscription_add_ons type="array">
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>bike-o-vision</add_on_code>
<unit_amount_in_cents type="integer">2000</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>boxx</add_on_code>
<unit_amount_in_cents type="integer">1499</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
<subscription_add_on>
<add_on_type>fixed</add_on_type>
<add_on_code>fitfusion-strala</add_on_code>
<unit_amount_in_cents type="integer">500</unit_amount_in_cents>
<quantity type="integer">1</quantity>
<revenue_schedule_type>evenly</revenue_schedule_type>
</subscription_add_on>
</subscription_add_ons>
What I need is a substring from the above xml string as below.
<subscription_add_ons type="array">
<subscription_add_on>
<add_on_code>bike-o-vision</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
<subscription_add_on>
<add_on_code>boxx</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
<subscription_add_on>
<add_on_code>fitfusion-strala</add_on_code>
<quantity type="integer">1</quantity>
</subscription_add_on>
</subscription_add_ons>
I tried to get it as below.
var xml = _xml.GetXmlNodes(xmlString);
StringBuilder sb = new StringBuilder();
sb.Append("<subscription>");
foreach (XmlNode node in xml)
var sIndex = node.OuterXml.IndexOf("<add_on_code>");
var eIndex = node.OuterXml.IndexOf("</add_on_code>");
var subs = "<subscription_add_on>" + node.OuterXml.Substring(sIndex, (eIndex - sIndex)) + "<quantity>1</quantity>" + " </subscription_add_on>";
sb.Append(subs);
sb.Append("</subscription");
The above snippet always fetches the first substring & to me it looks very inefficient.
How can I get the desired substring from a string(xml) in an efficient way?
Thanks!
c# string asp.net-core stringbuilder c#-7.0
c# string asp.net-core stringbuilder c#-7.0
edited Mar 31 at 20:52
Paulo Morgado
6,9341 gold badge17 silver badges35 bronze badges
6,9341 gold badge17 silver badges35 bronze badges
asked Mar 26 at 17:40
Kgn-webKgn-web
2,2107 gold badges34 silver badges75 bronze badges
2,2107 gold badges34 silver badges75 bronze badges
Instead of handling this as a string, use an XML parser stackoverflow.com/questions/5604330/…
– Jasen
Mar 26 at 17:50
If quantity is always1
why do you have it in source xml?
– Sergey Berezovskiy
Mar 26 at 17:51
What doesefficient way
mean? Readable? Maintainable? Performant? Extensible? Some of these don't mix well.
– Erik Philips
Mar 31 at 20:58
add a comment |
Instead of handling this as a string, use an XML parser stackoverflow.com/questions/5604330/…
– Jasen
Mar 26 at 17:50
If quantity is always1
why do you have it in source xml?
– Sergey Berezovskiy
Mar 26 at 17:51
What doesefficient way
mean? Readable? Maintainable? Performant? Extensible? Some of these don't mix well.
– Erik Philips
Mar 31 at 20:58
Instead of handling this as a string, use an XML parser stackoverflow.com/questions/5604330/…
– Jasen
Mar 26 at 17:50
Instead of handling this as a string, use an XML parser stackoverflow.com/questions/5604330/…
– Jasen
Mar 26 at 17:50
If quantity is always
1
why do you have it in source xml?– Sergey Berezovskiy
Mar 26 at 17:51
If quantity is always
1
why do you have it in source xml?– Sergey Berezovskiy
Mar 26 at 17:51
What does
efficient way
mean? Readable? Maintainable? Performant? Extensible? Some of these don't mix well.– Erik Philips
Mar 31 at 20:58
What does
efficient way
mean? Readable? Maintainable? Performant? Extensible? Some of these don't mix well.– Erik Philips
Mar 31 at 20:58
add a comment |
1 Answer
1
active
oldest
votes
Just parse the xml and remove the undesired elements:
XDocument doc = XDocument.Load("fileName.xml");
//or
//XDocument doc = XDocument.Parse(textString);
foreach(var removeNode in new string[]"add_on_type", "unit_amount_in_cents","revenue_schedule_type")
doc.Root.Descendants(removeNode).Remove();
string result = doc.ToString();
Edit: To add more elements, do this way:
doc.Root.Add(
new XElement(
"subscription_add_on",
new XElement("add_on_code","add_on_code_value"),
new XElement("quantity",
new XAttribute("type","integer"),
1
)
)
);
Many Thanks! One more thing to check if I want to add one more<subscription_add_on>
in the trimmed version. how can it be achived.
– Kgn-web
Mar 26 at 18:09
@Kgn-web just edited the answer to add one more element
– Magnetron
Mar 26 at 18:15
Thanks! but when doing so it add the new XELement as ` <subscription_add_on /> <add_on_code>test</add_on_code> <quantity type="integer">1</quantity>`
– Kgn-web
Mar 27 at 6:47
@Kgn-web it was not what you wanted? You can tweak the code according to your needs
– Magnetron
Mar 27 at 11:01
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55363265%2fhow-to-get-the-desired-substring-from-a-stringxml-in-an-efficient-way%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Just parse the xml and remove the undesired elements:
XDocument doc = XDocument.Load("fileName.xml");
//or
//XDocument doc = XDocument.Parse(textString);
foreach(var removeNode in new string[]"add_on_type", "unit_amount_in_cents","revenue_schedule_type")
doc.Root.Descendants(removeNode).Remove();
string result = doc.ToString();
Edit: To add more elements, do this way:
doc.Root.Add(
new XElement(
"subscription_add_on",
new XElement("add_on_code","add_on_code_value"),
new XElement("quantity",
new XAttribute("type","integer"),
1
)
)
);
Many Thanks! One more thing to check if I want to add one more<subscription_add_on>
in the trimmed version. how can it be achived.
– Kgn-web
Mar 26 at 18:09
@Kgn-web just edited the answer to add one more element
– Magnetron
Mar 26 at 18:15
Thanks! but when doing so it add the new XELement as ` <subscription_add_on /> <add_on_code>test</add_on_code> <quantity type="integer">1</quantity>`
– Kgn-web
Mar 27 at 6:47
@Kgn-web it was not what you wanted? You can tweak the code according to your needs
– Magnetron
Mar 27 at 11:01
add a comment |
Just parse the xml and remove the undesired elements:
XDocument doc = XDocument.Load("fileName.xml");
//or
//XDocument doc = XDocument.Parse(textString);
foreach(var removeNode in new string[]"add_on_type", "unit_amount_in_cents","revenue_schedule_type")
doc.Root.Descendants(removeNode).Remove();
string result = doc.ToString();
Edit: To add more elements, do this way:
doc.Root.Add(
new XElement(
"subscription_add_on",
new XElement("add_on_code","add_on_code_value"),
new XElement("quantity",
new XAttribute("type","integer"),
1
)
)
);
Many Thanks! One more thing to check if I want to add one more<subscription_add_on>
in the trimmed version. how can it be achived.
– Kgn-web
Mar 26 at 18:09
@Kgn-web just edited the answer to add one more element
– Magnetron
Mar 26 at 18:15
Thanks! but when doing so it add the new XELement as ` <subscription_add_on /> <add_on_code>test</add_on_code> <quantity type="integer">1</quantity>`
– Kgn-web
Mar 27 at 6:47
@Kgn-web it was not what you wanted? You can tweak the code according to your needs
– Magnetron
Mar 27 at 11:01
add a comment |
Just parse the xml and remove the undesired elements:
XDocument doc = XDocument.Load("fileName.xml");
//or
//XDocument doc = XDocument.Parse(textString);
foreach(var removeNode in new string[]"add_on_type", "unit_amount_in_cents","revenue_schedule_type")
doc.Root.Descendants(removeNode).Remove();
string result = doc.ToString();
Edit: To add more elements, do this way:
doc.Root.Add(
new XElement(
"subscription_add_on",
new XElement("add_on_code","add_on_code_value"),
new XElement("quantity",
new XAttribute("type","integer"),
1
)
)
);
Just parse the xml and remove the undesired elements:
XDocument doc = XDocument.Load("fileName.xml");
//or
//XDocument doc = XDocument.Parse(textString);
foreach(var removeNode in new string[]"add_on_type", "unit_amount_in_cents","revenue_schedule_type")
doc.Root.Descendants(removeNode).Remove();
string result = doc.ToString();
Edit: To add more elements, do this way:
doc.Root.Add(
new XElement(
"subscription_add_on",
new XElement("add_on_code","add_on_code_value"),
new XElement("quantity",
new XAttribute("type","integer"),
1
)
)
);
edited Mar 26 at 18:14
answered Mar 26 at 17:51
MagnetronMagnetron
3,1761 gold badge10 silver badges23 bronze badges
3,1761 gold badge10 silver badges23 bronze badges
Many Thanks! One more thing to check if I want to add one more<subscription_add_on>
in the trimmed version. how can it be achived.
– Kgn-web
Mar 26 at 18:09
@Kgn-web just edited the answer to add one more element
– Magnetron
Mar 26 at 18:15
Thanks! but when doing so it add the new XELement as ` <subscription_add_on /> <add_on_code>test</add_on_code> <quantity type="integer">1</quantity>`
– Kgn-web
Mar 27 at 6:47
@Kgn-web it was not what you wanted? You can tweak the code according to your needs
– Magnetron
Mar 27 at 11:01
add a comment |
Many Thanks! One more thing to check if I want to add one more<subscription_add_on>
in the trimmed version. how can it be achived.
– Kgn-web
Mar 26 at 18:09
@Kgn-web just edited the answer to add one more element
– Magnetron
Mar 26 at 18:15
Thanks! but when doing so it add the new XELement as ` <subscription_add_on /> <add_on_code>test</add_on_code> <quantity type="integer">1</quantity>`
– Kgn-web
Mar 27 at 6:47
@Kgn-web it was not what you wanted? You can tweak the code according to your needs
– Magnetron
Mar 27 at 11:01
Many Thanks! One more thing to check if I want to add one more
<subscription_add_on>
in the trimmed version. how can it be achived.– Kgn-web
Mar 26 at 18:09
Many Thanks! One more thing to check if I want to add one more
<subscription_add_on>
in the trimmed version. how can it be achived.– Kgn-web
Mar 26 at 18:09
@Kgn-web just edited the answer to add one more element
– Magnetron
Mar 26 at 18:15
@Kgn-web just edited the answer to add one more element
– Magnetron
Mar 26 at 18:15
Thanks! but when doing so it add the new XELement as ` <subscription_add_on /> <add_on_code>test</add_on_code> <quantity type="integer">1</quantity>`
– Kgn-web
Mar 27 at 6:47
Thanks! but when doing so it add the new XELement as ` <subscription_add_on /> <add_on_code>test</add_on_code> <quantity type="integer">1</quantity>`
– Kgn-web
Mar 27 at 6:47
@Kgn-web it was not what you wanted? You can tweak the code according to your needs
– Magnetron
Mar 27 at 11:01
@Kgn-web it was not what you wanted? You can tweak the code according to your needs
– Magnetron
Mar 27 at 11:01
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55363265%2fhow-to-get-the-desired-substring-from-a-stringxml-in-an-efficient-way%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Instead of handling this as a string, use an XML parser stackoverflow.com/questions/5604330/…
– Jasen
Mar 26 at 17:50
If quantity is always
1
why do you have it in source xml?– Sergey Berezovskiy
Mar 26 at 17:51
What does
efficient way
mean? Readable? Maintainable? Performant? Extensible? Some of these don't mix well.– Erik Philips
Mar 31 at 20:58