Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8229335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:45:53+00:00 2026-06-07T16:45:53+00:00

I have this following vary basic svg document with 1 flowtext and 1 text

  • 0

I have this following vary basic svg document with 1 flowtext and 1 text element :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="744.09448819"
   height="1052.3622047"
   id="svg2"
   version="1.1"
   inkscape:version="0.48.2 r9819"
   sodipodi:docname="New document 1">
  <defs
     id="defs4" />
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="0.35"
     inkscape:cx="375"
     inkscape:cy="520"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     showgrid="false"
     inkscape:window-width="1366"
     inkscape:window-height="706"
     inkscape:window-x="-8"
     inkscape:window-y="-8"
     inkscape:window-maximized="1" />
  <metadata
     id="metadata7">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1">
    <flowRoot
       xml:space="preserve"
       id="flowRoot2985"
       style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:Arial;font-style:normal;font-weight:normal;font-size:40px;line-height:125%;letter-spacing:0px;word-spacing:0px;-inkscape-font-specification:Arial;font-stretch:normal;font-variant:normal;text-anchor:middle;text-align:center;writing-mode:lr">
      <flowRegion
         id="flowRegion2987">
         <rect
           id="rect2989"
           width="600"
           height="162.85715"
           x="97.14286"
           y="89.505043"
           style="-inkscape-font-specification:Arial;font-family:Arial;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:40px;text-anchor:middle;text-align:center;writing-mode:lr;line-height:125%" />
       </flowRegion>
      <flowPara
         id="flowPara2993">Yahoo</flowPara>
    </flowRoot> 


    <text
       xml:space="preserve"
       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
       x="197.14285"
       y="352.36218"
       id="text3003"
       sodipodi:linespacing="125%">
      <tspan
         sodipodi:role="line"
         id="tspan3005"
         x="197.14285"
         y="352.36218">Gmail</tspan>
    </text>
  </g>
</svg>

I just want to get the elements which is inside the g element (.i.e flowRoot & text ),

for this i tried :

XElement svg = XElement.Load("path to svg file");
IEnumerable<XElement> elements = svg.Element("g").Elements();

But this is not working. Help me out please?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T16:45:55+00:00Added an answer on June 7, 2026 at 4:45 pm

    Try this, your XML uses namespaces:

            XDocument doc = XDocument.Load(<path to file>);
            XNamespace ns1 = "http://www.w3.org/2000/svg";
            //Namespace of a root element can also be retrieved like this:
            //XNamespace ns1 = doc.Root.GetDefaultNamespace();
            var g = doc.Descendants(ns1 + "g").FirstOrDefault();
            if (g != null)
            {
                var flowroot = g.Element(ns1 + "flowRoot");
                var text = g.Element(ns1 + "text");
            }
    

    You should have prefixed name with a namespace:

            IEnumerable<XElement> elements = svg.Element(ns1 + "g").Elements();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this following jquery text fly-in animation.Here is my code before I explain
Hi I have the following code: <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <title>Registration Form</title>
I have this following codes: @implementation MyImageView @synthesize image; //image is a UIImage -
i have this following html structure usilg ul and li. <ul class=treeview id=productTree> <li
I have this following query for CodeIgniter: $q = $this->db->where('(message_from='.$user_id.' AND message_to='.$this->auth_model->userdata['user_id'].')') ->or_where('(message_from='.$this->auth_model->userdata['user_id'].' AND
I have this following IEnumerable LINQ query: var query = from p in Enumerable.Range(2,
I have this following setup, a textarea named with some data in it that
I have this following code, here CssClass is of the String type. <asp:Panel ID=Panel1
I have this following numpy matrix that I want to sort in ascending order
I have this following code which will return all the current semesters. How do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.