You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by Bhaskar Maddala <ma...@gmail.com> on 2007/11/06 21:20:27 UTC
Noob : Axiom Question
Please pardon the email if this is the wrong mailing list, I could not
find "WS Commons Users" mailing list. The question might also be
related to JAXP and StAX (I did my search here too without much
progress), hence I am starting with the model that is closest to what
I use in my code
Is there an option in AXIOM to ignore white space
i.e. can I write the following code
I have the following method
public Map getNameValuePairs()
{
Map pairs = new HashMap();
Iterator children = m_element.getChildren();
while (children.hasNext())
{
OMNode omNode = (OMNode)children.next();
if (omNode.getType() == OMNode.ELEMENT_NODE)
{
OMElement element = (OMElement)omNode;
String name = element.getQName().getLocalPart();
String value = element.getText();
pairs.put(name, value);
}
}
return pairs;
}
as
public Map getNameValuePairs()
{
Map pairs = new HashMap();
Iterator children = m_element.getChildren();
while (children.hasNext())
{
OMElement element = (OMElement)omNode;
String name = element.getQName().getLocalPart();
String value = element.getText();
pairs.put(name, value);
}
return pairs;
}
Thanks
Bhaskar
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org